Introduction To Linux

Nawodit Oswal
4 min readFeb 8, 2024

--

What is Linux ?

  1. Linux is an open-source operating system (OS) that is widely used in servers, desktop computers, smartphones, and other devices. Linux was created in the early 1990s by Linus Torvalds, and is based on the Unix operating system.
  2. One of the key features of Linux is its open-source nature, which means that the source code of the operating system is freely available for anyone to modify and distribute. This has led to a large community of developers and users who contribute to its development and use.
  3. Linux is known for its stability, security, and flexibility, and is popular for use in web servers, cloud computing, scientific research, and many other areas.
  4. The popularity of Linux has also led to the creation of many different distributions or versions, such as Ubuntu, Debian, and Red Hat, each with their own features and strengths.

Applications :

  1. Mobile devices:
  2. Android, the world’s most popular mobile operating system, is based on the Linux kernel.
  3. Internet of Things (IoT):
  4. Linux is used in many IoT devices, such as smart thermostats, home automation systems, and industrial sensors.
  5. Security:
  6. Linux is often used in security-focused environments, such as network security appliances, firewalls, and intrusion detection systems.
  7. Cloud computing:
  8. Many cloud computing platforms, such as Amazon Web Services (AWS) and Google Cloud Platform (GCP), run on Linux servers.

Why Linux ?

  1. Open-source:
  2. Linux is an open-source operating system, meaning that its source code is available for anyone to use, modify, and distribute. This allows users to customize and adapt the system to their needs, and also means that Linux is often free to use.
  3. Stability and reliability:
  4. Linux is known for its stability and reliability, with a reputation for being less prone to crashes and errors than other operating systems.
  5. Security:
  6. Linux is generally considered to be more secure than other operating systems, due to its architecture and the availability of security-focused distributions.
  7. Flexibility and customizability:
  8. Linux is highly customizable, allowing users to choose from a wide range of distributions and software packages, and to configure the system to meet their specific needs.
  9. Performance:
  10. Linux is often used in high-performance computing environments, such as scientific research and supercomputing, due to its ability to handle large workloads efficiently.
  11. Community and support:
  12. Linux has a large and active community of users and developers, who provide support, guidance, and resources to users of all levels.

Overall, Linux offers a powerful and flexible operating system that can be tailored to meet the needs of users and organizations in a wide range of environments.

File system hierarchy :

The Filesystem Hierarchy Standard (FHS) is a set of guidelines that define the directory structure of Linux-based operating systems. Here is a brief overview of the most important directories in the FHS hierarchy:

  1. /: The root directory, which contains all other directories and files.
  2. /bin: Contains essential system utilities and binaries, such as ls, cp, and mv.
  3. /boot: Contains the files necessary to boot the system, such as the bootloader and kernel.
  4. /dev: Contains device files for all system devices, such as /dev/sda for the first hard disk.
  5. /etc: Contains system configuration files, such as /etc/passwd for user accounts.
  6. /home: Contains user home directories.
  7. /lib: Contains shared libraries that are required by system binaries in /bin and /sbin.
  8. /media: Mount point for removable media, such as USB drives or CD/DVDs.
  9. /mnt: Mount point for temporary file systems or network shares.
  10. /opt: Contains third-party applications installed on the system.
  11. /proc: Contains system information and process-related information, presented as files and directories
  12. /root: The home directory of the root user.
  13. /run: Contains system information that is required during the boot process.
  14. /sbin: Contains system administration binaries, such as iptables.
  15. /tmp: Contains temporary files that are created by the system or users.
  16. /usr: Contains user applications and support files, such as libraries, documentation, and development files.
  17. /var: Contains variable data files, such as log files, system databases, and spool files.

These directories and their subdirectories provide a standardized structure for the organization of files and directories in a Linux-based operating system.

Basic Linux Commands :

cd - change directory
Syntax: cd [directory_name]
Example: cd Document
ls - list files in a directory
Syntax: ls [options] [directory_name]
Example: ls -l /home/user
pwd - print working directory
Syntax: pwd
Example: pwd
mkdir - make directory
Syntax: mkdir [directory_name]
Example: mkdir new_directory
rmdir - remove directory
Syntax: rmdir [directory_name]
Example: rmdir old_directory
touch - create a new empty file or update an existing one
Syntax: touch [filename]
Example: touch file.txt
cp - copy file(s) or directory
Syntax: cp [options] [source] [destination]
Example: cp file1.txt /home/user/Documents
mv - move or rename file(s) or directory
Syntax: mv [options] [source] [destination]
Example: mv file.txt /home/user/Documents/new_file.txt
rm - remove file(s) or directory
Syntax: rm [options] [file(s) or directory]
Example: rm file.txt
cat - concatenate files and print to standard output
Syntax: cat [filename]
Example: cat file.txt
echo - print text to standard output
Syntax: echo [text]
Example: echo "Hello, world!"
chmod - change file or directory permissions
Syntax: chmod [options] [permissions] [file(s) or directory]
Example: chmod u+x script.sh
sudo - execute command as superuser (root)
Syntax: sudo [command]
Example: sudo apt-get update

Thank You for Reading the Blog

Connect with me on Linkedin: https://www.linkedin.com/in/onkarshete/

--

--