InMotion Hosting Support Center

When navigating through your server you may want to change to other directories. The cd command is the bash command to allow you to move to other folders within your account.

Command: cd
Synopsis: cd [dir]

Option Long name Description
-P This forces the command to use the physical directory structure and does not include symlinks.
-L This forces the command to use the logical directory structure and includes any symlinks.


Below are a few examples of using the cd command. You can confirm your loction after running your cd command by using the pwd command.

cd [dir] - This command moves you to the path you specify. If you begin the path with a / it will start at the root folder for your account, as in the example below.

# cd /home/userna5/public_html
# pwd

cd [dir] - Continuing the above example, not using a / in the path begins from your current location. In this example, we begin in the /home/userna5/public_html directory.

# cd images
# pwd

cd .. - This command moves you to the directory just above your current location.

# pwd
# cd ..
# pwd

cd / - Using only the / as the path will return you to the root folder.

# cd /
# pwd

cd ~ - When using the ~ (tilde) character as the path, you will be returned to your home directory. The example below assumes a user named userna5.

# cd ~
# pwd

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!