░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░
░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░
░░░░██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░
░░██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░
░░██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░
▒▒▒▒▒▒████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒██▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒██▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████▒▒▒▒▒▒
░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████░░
░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████░░
░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████░░░░
░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░
░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░

cd

cd stands for Change Directory, it lets you change where you are in a terminal.

Usage

To use the cd command, open a terminal and type

bash $ cd

It won't do anything (or it will go to your home directory) yet because it doesn't have a path to go to, so lets try and add the name of a directory at the end

bash $ cd test This will go into the directory test.

There are a couple of things to know to make life a little easier. You can use the tilde character to go back to the home directory.

bash $ cd ~

Periods are used to select the current or the previous directory respectively. bash $ cd . $ cd ..

Slashes are used to go trough multiple directories at once bash $ cd test/testing This can be used in combination with the periods bash $ cd ../testing2

CC BY-SA 4.0