Linux Command Line (04) CD – Change Directory



Linux Command Line (04) CD – Change Directory

Linux Command Line (04) CD - Change Directory

To go into a folder in the file browser, we double click on the folder we want to go into and the arrow up to go up one directory.

To do the same thing in the Linux Command Line terminal, we would type: cd and the directory name we want to go into to go into the Documents directory we would type: cd Documents

We see the . and the .. directories and find out that the . directory means the current directory and the .. directory is for the parent directory.

We use the pwd command to print our working directory.

The list of directories is called the PATH.

We see the / is the root directory and when we start a path with / we are referring to the full or “absolute path” and when we change the directory without starting with a / we are talking about a relative directory.

We learn that we can type in a few characters and the tab key to auto-complete what we are typing.

cd – will take you back to the directory you were just in
cd and pressing enter will take you to your home directory
cd ~/Documents will take you to your home directory, then go to the Documents directory

Comments are closed.