--- layout: page category_title: Basic commands category-page: basic tags: directory change navigate author: Marinelli Alessandro title: CD 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 directoty
Let's see how to use the command cd
in order to change the working directory
Device-Name:~ YourName$ cd Desktop/Multimedia.Folder/ Device-Name:Multimedia.Folder YourName$
As you can see, we changed the working directory from ~ (which stands for HOME),
to Multimedia.Folder
. Now our Shell will work on the directory Multimedia.Folder
until a new cd
will occour.
Notice: If you want to move to a directory which is not contained in current working directory, you MUST use the absolute path.