In Linux Commands Tutorials we will learn some most important basic and advance Linux commands with examples. Linux is a commands base operating system . So to operate Linux OS one should have some basic knowledge of commands. So let us start.
Linux Commands :
1 . man
The man command is the user manual of commands available in the Linux. If you don’t know how to use a command type man and after that type the command name you want a proper documentation and details like description, syntax, usage etc. It will give you full details.
$ man [options] [command name]
2 . pwd
If you want to know in which directory you are in just type command pwd and it will tell you where are you in. pwd means Print Working Directory that is current working directory.
$ pwd [options]
In above image current working directory is /home/bptutorials
3 . cd
The meaning of cd command is Change Directory. It is used to navigate from one directory to another. Suppose we are in dev directory and want to go to var director then we will write $ cd / then cd var
$cd [options] [directory name]
To navigate to var directory first we have to go to root( / ) directory then cd var command move to var directory.
cd / : This command represents root directory . Here / represents root directory. When we write cd / in terminal, it change directory from current directory to root directory.
cd ~ : This command will change directory to home directory.
cd : cd is same as cd~
cd .. : This command change to the parent directory or one level up of current directory.
In above pic first cd.. move one level up i.e. var directory and second cd.. move to parent directory / .
cd ” dir name” : This command changed to the specified directory with spaces.
In above pic directory “php programming” include space so we write command like cd “php programming” .
cd dir\ name : This command works same as cd “dir name” .