Last command shows you how to print the working directory. Today, I will show you how to change from your working directory to another one. To do this, enter cd (stand for change directory) followed by the pathname of the desired working directory. Pathnames can be specified in one of two different ways; absolute pathnames or relative pathnames.

For examples:

cd /usr

This command moves you to the "/usr" directory and this directory becomes your current working directory.

cd /home/vntutor
Moves you to the /home/vntutor directory.

cd ..
Moves you to the parent directory of your working directory (in this case to be /home directory)

cd vntutor
Moves you to the sub directory of your working directory (in this case, /home/vntutor directory is sub directory of the /home directory)

cd
Issuing the cd command without any arguments moves you to your home directory.

0 comments