Basics of Linux
History of Linux
Linux came from a Unix family, Linux is a free and open-source software operating system, which was developed by Linus Torvalds in September 1991. In 1991, when Linus Torvalds was a student at the University of Helsinki, Finland, USA He developed the first code of Linux 0.01 and post it on Minix Newsgroup on 17 Sep 1991, his code become so popular people encouraged him to develop new code and he was lead to develop new code and release the first official version of Linux Version 0.002 on 5th Oct 1991. Today many years passed and Linux become one of the most popular operating Systems.
Architecture of Linux
Kernel: Kernel is the core of the Linux based operating system. It virtualizes the common hardware resources of the computer to provide each process with its virtual resources. This makes the process seem as if it is the sole process running on the machine. The kernel is also responsible for preventing and mitigating conflicts between different processes. Different types of the kernel are:
Monolithic Kernel
Hybrid kernels
Exo kernels
Micro kernels
System Library: Isthe special types of functions that are used to implement the functionality of the operating system.
Shell: It is an interface to the kernel which hides the complexity of the kernel’s functions from the users. It takes commands from the user and executes the kernel’s functions.
Hardware Layer: This layer consists all peripheral devices like RAM/ HDD/ CPU etc.
System Utility: It provides the functionalities of an operating system to the user.
Advantages of Linux:
The main advantage of Linux, is it is an open-source operating system.
The software updates in Linux are easy and frequent.
Linux is freely available to use on the internet.
In terms of security, Linux is more secure than any other operating system.
It has large community support.
It maintain the privacy of the user.
The performance of the Linux system is much higher than other operating systems. It allows a large number of people to work at the same time and it handles them efficiently.
Basic Commands In Linux:
Listing commands
ls option_flag arguments
--> list the subdirectories and files avaliable in the present directory
Examples:
ls -l
--> list the files and directories in long list format with extra informationls -a
--> list all including hidden files and directoryls *.sh
--> list all the files having .sh extension.ls -i
--> list the files and directories with index numbers in inodesls -d */
--> list only directories.(we can also specify a pattern)
Directory commands
pwd
--> print work directory. Gives the present working directory.cd path_to_directory
--> change the directory to the provided pathcd ~
or justcd
--> change directory to the home directorycd -
--> Go to the last working directory.cd ..
--> change directory to one step back.cd ../..
--> Change directory to 2 levels back.mkdir directoryName
--> to make a directory in a specific location
Examples:
pwd
--> print work directory. Gives the present working directory.cd path_to_directory
--> change the directory to the provided pathcd ~
or justcd
--> change directory to the home directorycd -
--> Go to the last working directory.cd ..
--> change directory to one step back.cd ../..
--> Change directory to 2 levels back.mkdir directoryName
--> to make a directory in a specific location
Examples:
mkdir newFolder # make a new folder 'newFolder'
mkdir .NewFolder # make a hidden directory (also . before a file to make it hidden)
mkdir A B C D #make multiple directories at the same time
mkdir /home/user/Mydirectory # make a new folder in a specific location
mkdir -p A/B/C/D # make a nested directory
Subscribe to my newsletter
Read articles from Pratibha Yedle directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by