--- layout: page category-title: Basic commands category-page: basic tags: directory change navigate author: Alessandro Marinelli title: cd previous-page: pages/cmd/basic/open.html next-page: pages/cmd/basic/ls.html ---

The cd command is used to change the working directory
The name stands for Change Directory.
The default cd command syntax is:

cd [flags] [path]
Where [flags] are the cd flags, read below for more info,and [path] is the path (absolute or relative), of the directory which we want to make as working directory.

Change the working directory

Let's see how to use the command cd in order to change the working directory
pwd
    ~
cd Desktop/multimedia
pwd
    ~/Desktop/multimedia
As you can see, we changed the working directory from ~ (which stands for HOME), to "multimedia". Now our Shell will work on the directory "multimedia" until a new cd will occour.
Notice: If you want to move to a directory which is not contained in the current working directory, you MUST use the absolute path.

Header 1

Header 2

Header 4