--- layout: page category-page: fs category-title: FileSystem tags: change directory author: Alessandro Marinelli title: cd previous-page: pages/fs/absolute.html next-page: pages/fs/du.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.