Table of contents
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.
Terminal: In Linux, the terminal is a command-line interface (CLI) where you can enter text commands to interact with the operating system.
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.
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
/ - The base of the Linux directory is root , this is the starting point of FSH.
/root - It is the home directory for the root user.
/bin ->User Binaries - It contains Commands used by all users.
/sbin ->System Binary - It contains commands used by only root user
/dev ->Device Files - It contains hardware device files.
/var ->Variable Files - The variable data files such as log files are located in the /var directory.
/mnt ->Mount Directory - This directory is used to mount a file system temporarily.
/media -> Removable Media Devices - The /media directory contains a sub-directory where removable media devices inserted into the computer are mounted.
/usr - By default software is installed in this directory.
/etc - It contains all configuration files.
/boot - It contains bootable files for Linux.
/home - home directory for other users.
/tmp -> Temporary Files - It contains temporary files created by systems and users and deleted when the system is rebooted.
/opt - Optional Application software packages.
/dev - Essential Device files. This includes terminal devices, USB or any device attached to the system.
TASK:
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.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.
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