In Day 2 task of the #90DaysOfDevOps challenge we are going to learn about Basic Linux Commands that will help you get started with Linux.
But, before learning the commands let us all know -
What is Linux and it's structure ?
Why to use Linux ?
What is Linux ?
Linux is an free open source software or we can say operating system that is used in smartphones, super-computer, home appliances, desktop to enterprise servers etc almost everywhere. It is very reliable, more secure, and worry-free OS is available in market.
It was first released by Linus Torvalds in mid 90s.
The best thing is that even Android is powered by Linux OS. As Linux is open source so it has so many distributions in the market like if i talk about most popular one that are - RedHat Linux, Ubuntu, Fedora, SUSE, CentOS.
Sturucture of Linux:
The Linux operating system comprises of several different things:
1) Bootloader: This is the first software that simply pops up when you start the Linux OS. It simply manages the boot process of operating system.
2) Kernel: This is at the lowest level in OS. This is core of the Linux system or we can say this is the "LINUX" that manages the CPU, peripheral devices, and hardware.
3) Deamons: This is the service which runs in background you can say boot up the computer, sound etc.
4) Graphical Server: To display the graphics to your monitor.
5) Desktop Environment: In market there are so many desktop environments like KDE,GNOME,Unity etc that provides built-in applications to the user with different environment.
Why to use Linux ?
As I said Linux is an open source software that is more reliable, more secure than Windows, and it was used in world's top 500 supercomputers.
If you are a windows user sometime you find viruses, malware in your system that slows down the computer or sometime it crash but Linux is the most reliable computer that makes the system more secure. If we talk about price, in Windows you have to buy the License after paying the heavy cost, and after sometime license expires but in Linux you have to just download the any distribuitions that are availaible in market. In Linux, you can do customisation.
There is so much to learn in Linux. We'll discuss this in another detailed blog.
Basic Commands of Linux:
Listing Commands:
$ ls
This will list all the files and directories.
$ ls -l
This will give the list of all files and directories in long list format with more information.
$ ls *.sh
This will give all the shell file that has (.sh) extension. Here * means all.
$ ls -a
This will give all the hidden files and directories.
$ ls -i
This will list all the files and directories with inode number.
Directory Commands:
$ mkdir directoryname
This command will create the new director/folder.
$ pwd
This will print the present working directory means on which directory you are in.
$ mkdir .filename
This command will create the hidden directory as . is used for creating hidden directory.
$ mkdir folder1 folder2 folder3
This will create 3 folders or directories in user. In Linux if you had given spaces then it will create 3 new folders.
$ cd ~
This command will change the directory to home directory.
$ cd ../..
This command will change the directory to two steps back.
$ cd -
This command will go back the last working directory and prints the last working directory also that you are in.
$ mkdir -p file1/file2/file3
This command will create the nested directories. "-p" is parent directory.
Stay Tuned !! For next blog.
Connect me on Twitter and Hashnode for more Linux and DevOps blogs.
THANK YOU :)