Search⌘ K
AI Features

Command cd

Explore how to navigate the Bash file system using the cd command. Learn to use absolute and relative paths, including special paths like .. and ., and understand how to move through directories efficiently to manage files in the shell.

We'll cover the following...

The cd command

Now that we have got everything about the current directory, we can change it.

Let’s suppose that we want to go to a directory named usr. We will call the cd command to go to the /usr path. We can do it this way:

cd /usr

Let’s connect to the following ...

Changing directories