Command Line Change Directory - Directories cd
To change directories on the command line, simply use cd
To change to the directory "docs", provided "docs" is in the directory in which you currently reside, type at the prompt:
cd docs
The prompt in my terminal is "chris$", so the above command looks like this:
chris$ cd docs
To change one directory up:
cd ..
or
cd ../
To change to directory "docs" if it resides one level up:
cd ../docs
To change to directory "docs" if it resides two levels up, type:
cd ../../docs
To change to the home directory on your machine, type:
cd /
Copy and Paste Command Line Code:
cd ..
cd ../../
cd NameOfDirectory
cd /
COMMAND LINE TIPS:
To see a list of commands on your Unix or Mac machine, type:
man builtin
or
man cd
The "enter/return" key or "down arrow" key will page down, and "q" will return you to the prompt.
To see a list of operands (options/arguments) for a specific command, type:
man CommandYouWantToKnowAbout
example:
man ls