Change Current/Working Directory (cd)

Go to current user's directory

If you are logged as "root", your user directory would be "/root", but you can just type "~" instead.

cd ~ 

Go up a level

cd ../

Go up a level and then into a directory found at that level

Syntax

cd ../[directory]
  • [directory] -- A directory found above your current directory.

Example

cd ../pics

Go to absolute root directory

Not to be confused with the "root" user's directory.

If you are using a web hosting provided that has limited your user privileges, you not be able to access the "absolute root" directory, but rather the upper most directory available to you.

cd /

Return to the previous directory

cd -