Title: pwd and cd Commands
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

pwd

The 'you are here' sign can be displayed with the pwd command (Print Working Directory). Go ahead, try it. Open a command line interface (like gnome-terminal, konsole, xterm, or a tty) and type pwd. The tool displays your current directory.

cd

You can change your current directory with the cd command (Change Directory).

cd ~

You can pull off a trick with cd. Just typing cd without a target directory, will put you in your home directory. Typing cd ~ has the same effect.

cd ..

To go to the parent directory (the one just above your current directory in the directory tree), type cd .. .

cd -

Another useful shortcut with cd is to just type cd - to go to the previous directory.

(Paul Cobbaut, p. 27-28)