Linux Basics

Linux Basics

Week 1 Learning !

Hi Folks!

We'll cover Linux roadmap from Scratch to advance. in two part. It will help you to enhance your knowledge. In this we will learn about Basic Linux

#90daysofdevops

What is Linux - Linux is a Operating System similar to windows it also manages the resource of a computer and provides a plateform to the softwareapplications to run .

Below is the linux architecture :

Introduction to Linux Operating System - GeeksforGeeks

Kernel- in simple language Kernel works as a heart of linux which connects and hardware and application .

Shell - Its a kind of doorway which provide interaction between user and kernel,It takes commands from the user and executes the kernel’s functions.

Here, Below I will be explaining on my words what each commands does.

⏩ls- Lists all the files in present directory

⏩clear - It clears your screen and make it blank.

⏩pwd \= t will tell you present directory in which you are present right now .

⏩cd .. = it will go to one directory back .

Above we were in /home/aniketsingh and after executing cd .. it went to one dir back that is /home.

⏩cd - = It will send you to last present directory

⏩mkdir - it will create a new directory

Here a new directory(folder ) is created with name blog

mkdir -p - it will create nested directory

In above pic , nested directory(dir under dir.) is created.

mkdir {1..10}- It will create 10 directory at a time from number 1 to 10

⏩rmdir- it will remove empty directory

Above I created a file inside blog directory due to which rmdir is not able to delete the file.

⏩rm - It will delete the directory or file

In rmdir it was not deleted but using rm -r(recursive) the blog folder got deleted instead of having file inside it .

Below are the options we used with commands for specific task

-a

Show all (including hidden)

-R

Recursive list

-r

Reverse order

-t

Sort by last modified

-S

Sort by file size

-l

Long listing format

-1

One file per line

⏩touch - It will make a empty file

here a new file with first.txt got created

⏩hostname- it shows server name (Ip addreess) which you are connected

⏩whoami- It will show you your username by which you are active

⏩cal- It will display calendar (If not working do ... Sudo apt install ncal )

⏩date - it shows date and time

⏩uname -It will display kernel Name

⏩jobs - It shows running jobs

⏩ps - it will show the process status with process ID

⏩history - It shows the history of last executed commands

⏩cat - It will display the content of a file

⏩cp - It copies file from one path to another , or in same path it will create one more with different name and same content.

⏩mv - It moves the file or dir to different path or in same path by changing the name

gzip - It will zip or compress the file

Here it zipped the file and add a extension .gz, for viewing the content of zippped file we need to use zcat .

gunzip- It will unzip the file

man - it will show you the manual of any command

syntax - man command name

Kill - It is used to kill any running process with the help of PID(process ID)