How to change a working directory

cd

Change Directory - change the current working directory to a specific Folder.

The syntax is cd followed by the name of the directory you want to go to.

For example:

cd /home/user/public_html  to change the current working directory  to /home/user/public_html.

The '/' indicates the path relative to the root directory, and no matter what directory you are in when you execute this command, the directory will be changed to /home/user/public_html.

cd public_html/ to change the current working directory to public_html/, relative to the current location which is /home/user. The full path of the new working directory is /home/user/public_html.


cd ..                                        Move to the parent directory of the current directory. This command

                                              will make the current working directory "/home.


cd ~                                        Move to the user's home directory which is "/home/username".

                                              The '~' indicates the users home directory.

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close