Skip to main content

Command Palette

Search for a command to run...

Day 2 : Introduction to Linux: Exploring an Amazing Operating System🚀🚀

Published
8 min read
V

Experienced QA professional with a passion for manual and automation testing. Proficient in DevOps practices, ensuring seamless integration and continuous delivery. Dedicated to ensuring top-notch software quality and efficiency. Eager to contribute my skills to Hashnode's vibrant tech community. Let's collaborate and create exceptional experiences!

🐧Introduction

Welcome to the world of Linux, an extraordinary and free operating system known for its reliability, security, and flexibility. In this blog series, we'll take you on a journey to discover the wonders of Linux. From its background and key features to the command-line interface, we'll guide you through the basics of using Linux. We'll also introduce you to a variety of free software applications available on Linux, empowering you to enhance your computing experience. Whether you're a beginner or have some experience, join us as we delve into the amazing world of Linux and unlock its endless possibilities. So Let's dive in together!

🐧What is Linux

Linux is an operating system that many people use because it's dependable, safe, and can do many things. It's made by a group of people from around the world who work together and share their work for free. There are different kinds of Linux, called distributions, that have their special qualities.

  1. Ubuntu: This one is good for people who are new to Linux, user friendly with a range of features

  2. Fedora: This version is all about using the newest software. People who like to be on the cutting edge of technology usually prefer Fedora.

  3. Debian: If you want an operating system that doesn't crash and is all about being open and free, Debian is a good choice. Many other Linux versions are based on Debian.

  4. CentOS: This version is made for big servers and businesses. It's stable and gets long-term support, meaning it'll be taken care of for a long time.

  5. Kali Linux: This one is made specifically for cybersecurity and testing security. It has a lot of tools built in for finding vulnerabilities and checking how secure things are.

🐧Linux Vs 💻Windows

AspectLinuxWindows
Operating SystemOpen-source operating system based on Unix-like principlesProprietary operating system developed by Microsoft
CustomizationHighly customizable with various desktop environmentsLimited customization options, mainly focused on themes
User InterfaceMultiple desktop environments available (e.g., GNOME, KDE)Consistent user interface across different versions
SoftwareA vast range of free and open-source software is availableWide variety of commercial and proprietary software
Command LinePowerful command-line interface (CLI) with extensive featuresCommand Prompt available, but less feature-rich
SecurityFewer viruses and malware due to a smaller user baseA frequent target for viruses and malware due to its popularity
GamingLimited game selection, but growing support through WineExtensive gaming support and a large library of compatible games
Hardware SupportBroad hardware support, especially for older devicesExtensive support for various hardware configurations
StabilityKnown for stability and reliabilityOccasional stability issues and updates may cause disruptions
LicensingGenerally free and open-source (with some exceptions)Requires purchasing licenses for most versions
System UpdatesEasy and centralized updates through package managersUpdates managed through Windows Update

🐧How is the Linux Architecture

Linux is renowned for its modular architecture, which comprises distinct layers that fulfill specific roles within the operating system. Let's explore each area in more detail.

1. Hardware: Linux boasts broad support for a variety of hardware architectures, including x86, ARM, PowerPC, and more. It effectively interacts with crucial hardware components like CPUs, memory, disks, network interfaces, and peripherals. Device drivers play a vital role in enabling Linux to communicate with and control diverse hardware devices.

2. Kernel: At the heart of the Linux operating system resides the kernel, serving as its central component. The kernel directly engages with the hardware, proficiently managing system resources and providing an interface for applications. It assumes critical responsibilities such as process scheduling, memory management, device driver integration, and system security.

Some essential Linux kernel-related commands are:

  • uname -r: Displays the current Linux kernel version.

  • lsmod: Lists the kernel modules currently loaded into memory.

  • dmesg: Offers insights into kernel messages and system logs.

3. Shell: The shell acts as an intermediary between users and the operating system, facilitating interaction through command-line interpretation. Linux offers several shell options, with Bash (Bourne Again SHell) being the most prevalent. The shell skillfully interprets user commands, empowering users to control the system and execute programs.

Some common shell commands include:

  • ls: Lists files and directories.

  • cd: Changes the current directory.

  • mkdir: Creates a new directory.

  • cp: Copies files or directories.

  • rm: Removes files or directories.

4. Applications: Linux boasts an extensive assortment of applications and software tailored for various purposes. Open-source software plays a substantial role in the Linux ecosystem, fostering collaboration and innovation. Users can easily install and utilize applications that meet their specific needs, such as web browsers, office suites, media players, and development tools. Package managers like apt, yum, or dnf simplify the installation and management of software packages.

Command related to package management include:

  • apt-get install <package>: Installs a package using the Advanced Package Tool (APT).

So, Linux's modular architecture encompasses the hardware layer, the kernel as the core component responsible for system operations, the shell providing a command-line interface, and a diverse collection of applications managed through package managers. This architectural design offers unparalleled flexibility, customization, and efficient management capabilities for Linux-based systems.

🐧Basic Linux Commands ⚙️🔧

Commonly used Linux commands along with examples:

  1. ls: Lists files and directories in the current location.

    Example: To see a list of files and directories in the current folder, type ls and press Enter.

    The -a option displays all files, including hidden files, in the current directory.

    Example: To see a list of all files and directories, including hidden ones, type ls-a and press Enter.

  2. cd(Change directory): Changes the current folder (directory).

    Example: If you want to navigate to a folder named "Documents," type cd Documents and press Enter.

    The .. notation allows you to move up one level in the directory hierarchy.

    Example: To navigate to the parent directory, type cd .. and press Enter.

  1. pwd(Print working directory): This shows the current folder you are in.

    Example: To know the current location (folder), type pwd and press Enter.

    The -P option displays the physical (actual) path of the current directory, resolving any symbolic links.

    Example: To print the physical path of the current directory, type pwd -P and press Enter

  2. mkdir(Make directory): Creates a new folder (directory).

    Example: To create a folder named "Photos," type mkdir Photos and press Enter.

    The -p option creates parent directories if they don't exist. Example: To create nested directories, including any parent directories, type mkdir -p Parent/Child/Grandchild and press Enter.

  3. rm: Removes (deletes) a file or folder.

    Example: To delete a file named "report.txt," type rm report.txt and press Enter.

    Note: Be cautious when using rm as it permanently deletes files.

    The -r option recursively removes a directory and its contents.

    Example: To delete a directory named "folder" and its contents, type rm -r folder and press Enter.

    The -f option forces the removal of files without prompting for confirmation. Example: To forcefully delete a file named "file.txt," type rm -f file.txt and press Enter.

  4. cp: Copies a file or folder to another location.

    Example: To make a copy of a file named "notes.txt" in the folder "Documents," type cp notes.txt Documents/ and press Enter.

    The -r option copies directories recursively, including their contents.

    Example: To copy a directory named "folder" and its contents to another location, type cp -r folder /path/to/destination and press Enter.

  5. mv: Moves or renames a file or folder.

    Example: To move a file named "file.txt" to a different location or rename it, type mv file.txt /path/to/destination/newfile.txt and press Enter.

    The -i option prompts for confirmation before overwriting an existing file.

    Example: To move a file named "file.txt" to a different location, type mv -i file.txt /path/to/destination and press Enter.

  6. cat(Concatenate and display file contents): Displays the contents of a file on the screen.

    Example: To see the contents of a file named "README.txt," type cat README.txt and press Enter.

  7. sudo: Executes a command with administrative privileges (superuser/root).

    Example: To install software using administrative access, type sudo apt-get install package_name and press Enter.

So, These are basic Linux commands to get started.👍

💥Remember to be cautious while using commands that can modify or delete files, and always double-check the command and its arguments before executing them.💥

🐧Conclusion

🖋Linux architecture is designed with a modular approach, making it flexible and robust.

🖋Compared to Windows, Linux offers greater customization options and a wide range of open-source software.

🖋By exploring Linux's architecture, comparing it with Windows, and mastering basic commands, beginners can embark on their journey to effectively use and navigate the Linux ecosystem.

🖋Basic Linux commands, such as navigating through directories (cd), listing files and directories (ls), creating directories (mkdir), and manipulating files (cp, mv, rm), provide beginners with the fundamental tools to interact with the operating system.

🌈So, I hope you found this blog helpful!

🤔If you have any questions or need further assistance, please let me know in the comments section below. I am here to support you on your learning journey.

✌If you found this information valuable, consider following me on Hashnode for more insightful blogs. Stay tuned for future articles filled with exciting content.

🚀🚀Happy learning!🤗

S

Very well described, articulation is crisp and clear. Keep up.

1
V

Thanks alot..Glad that you liked my blog.This will motivate me to keep up this