Tag: cd

How to use the command CD in Linux Terminal – Ubuntu, Fedora, CentOS

The command CD stands for change directory. CD can be used in many ways to navigate between multiple directories just like we traverse in GUI.

cd <filename>

The above command will move to the directory specified in the angular brackets. But you have to make sure that the name given here is present in the current directory. You can see what are the folders/files in the current directory using the command LS. Also you can check your current working directory using the command PWD.

cd /path/to/another/folder

The above command will take to another folder that is far away from the current working directory. Make sure that the specified path exists. You can check the path of the current structure using the command TREE.

cd ..

The above command will move the current working directory to one level back.

cd 

The above command without any arguments will take you to the home directory no matter where your current working directory is.

There is a video example for the same, watch it below