Basic of Linux

Basic of Linux

Day 2 of 90daysofdevops

Linux

  • Linux is a free and open-source operating system (OS) based on the Unix operating system. It was created by Linus Torvalds in 1991 and has since become one of the most popular and widely used operating systems in the world.

  • Linux is known for its stability, security, and flexibility, and it is used on a wide range of devices, including servers, desktop computers, smartphones, embedded systems, and more.

  • One of the defining features of Linux is its open-source nature, which means that its source code is available to the public and can be freely modified, distributed, and used by anyone. This has led to a large and active community of developers who contribute to the development of Linux distributions (commonly referred to as "distros") that are tailored to different use cases and preferences.

History

  • In 1991, Linus Torvalds a student at the University of Helsinki, Finland, thought to have a freely available academic version of Unix started writing its code. Later this project became the Linux kernel.

  • He published the Linux kernel under his own license and was restricted to use as commercially. Linux uses most of its tools from GNU software and is under GNU copyright. In 1992, he released the kernel under GNU General Public License.

Architecture

  • The architecture of Linux mainly Contains Applications, Shell, Kernel, and Hardware.

    1. Terminal: In Linux, the terminal is a command-line interface (CLI) where you can enter text commands to interact with the operating system.

    2. Kernel: A kernel is the critical component of an operating system. It works as a bridge between the applications and data processing at the hardware level with the help of its interprocess communication and system calls.

    3. Shell: The shell is a command interpreter that interprets the commands entered in the terminal and communicates with the Linux kernel to execute them. Popular shells in Linux are Bash, Zsh .

File System Hierarchy

  1. / - The base of the Linux directory is root , this is the starting point of FSH.

  2. /root - It is the home directory for the root user.

  3. /bin ->User Binaries - It contains Commands used by all users.

  4. /sbin ->System Binary - It contains commands used by only root user

  5. /dev ->Device Files - It contains hardware device files.

  6. /var ->Variable Files - The variable data files such as log files are located in the /var directory.

  7. /mnt ->Mount Directory - This directory is used to mount a file system temporarily.

  8. /media -> Removable Media Devices - The /media directory contains a sub-directory where removable media devices inserted into the computer are mounted.

  9. /usr - By default software is installed in this directory.

  10. /etc - It contains all configuration files.

  11. /boot - It contains bootable files for Linux.

  12. /home - home directory for other users.

  13. /tmp -> Temporary Files - It contains temporary files created by systems and users and deleted when the system is rebooted.

  14. /opt - Optional Application software packages.

  15. /dev - Essential Device files. This includes terminal devices, USB or any device attached to the system.

TASK:

  1. Command to use the present working directory :
    The "pwd" command stands for "print working directory". It is used to display the full path of the current working directory.

  2. Command to list files and directories with hidden files :

    ls is a command that is used to list the files and directories in a directory. The -la option tells ls to display the files in a long format and include hidden files.

  3. Command to create a nested directory A/B/C/D/E :

    The command to create a nested directory is mkdir -p A/B/C/D/E. The -p switch creates parents’ directories.

Thank You,

Abhisek Moharana