Introduction to Linux & Vi

24 Sep 2021 Balmiki Mandal 0 Linux

Linux Basic Commands


Linux operating System has a beautiful Graphical Interface which most of us will be using . it will be good to learn the basic commands in linux to work interactively with the linux operating system.linux has a back to back end access known as shell. you can control and activate all the process in linux from the shell. so it is very important to learn few basic commands to work with linux Operating System .

First, we will learn how to log in for shell access. there are 7 terminals for Linux, 6 terminals are non -GUI and 1 terminal for GUI access . you can log in to each terminal using Alt + Ctrl + F1,...F7. each terminal will request your user name and password for login. if you want to use the shell in the Graphical interface (GUI) ,press Alt+2 and type "Konsol". 


Basic command in Linux 

1.Native Commands - [pwd,cd]

[pwd]:-This command is used to find the current location or current working directory.

Eg:

[user@ws26~]$p wd

/home /user

cd

this command ID used to change the directory. You can move from one directory to another using this command. Few examples are given below. Consider you have a directory structure /home/user/test/test1/ .test and test1 are directories in user home.

Example 1:

consider you have a directory "test" in /home/user. you curent working directory is /home/user. You want change the current woring directory from /home/user/ to /home/user/test, use the following command

[user@ws26~]$ pwd

/home/user

[user@ws26~]$ cd test

[user@26~]$ pwd

/home/user/test

Example 2:

If you want to move back to /home/user, use the following command

[user@ws26~]$ cd ..

[user@ws26~]$ pwd

/home/user

Example 3:

To get back to the home directory of the user

[user@ws26~]$ cd~

[user@ws26~]$ pwd

/home/user.

1.2.2 Listing contents in a directory -[ls, ls -l ll]

ls

This command used to  ist out all the files and directories in the current directory.

Eg:

[user@ws26~]$ ls

1152696870.jpg book OperaDownloads snapshot52.png

Image300.jpg Desktop test spiderman2.jpg

ls -l or ll

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BY: Balmiki Mandal

Related Blogs

Post Comments.

Login to Post a Comment

No comments yet, Be the first to comment.