Basic linux commands we should know to start using a terminal

Hidden Night
1 min readApr 27, 2022
example of a terminal screen

Some of the basic linux commands are cd, pwd, mkdir, rmdir, ls, exit.. Let's learn what is the uses of each of these commonds.

cd

cd command is used to change the working directory. Simply typing cd (or cd ~)will change the working directory to our home directory. cd followed by a hyphen (cd -) is used to go back to the previous directory. To change directory type cd followed by the path of the directory after a space.

pwd

pwd command is used to show present working directory.

mkdir

To create a new directory. For eg mkdir dir1 will create a directory named dir1 inside the present directory.

rmdir

To remove or delete a directory.

rm

rm command is used to remove files. We can use rm -r to remove a non empty directory.

ls

ls command is used to list the contents of a directory. ls -a is used to list all files including the hidden files(whose filename start with a .).

exit

exit command is used to exit from the terminal.

--

--