shellspells beta

cd

cd [-L|-P] [dir]

cd changes the current directory to the one specified.

Essential for making your way around the filesystem. You'd be stuck without it. On the face of it a very simple command, but with few tricks up its sleeve to make navigation more efficient.

Examples

Change to previous directory

cd -

Change to home directory

cd

Change to subdirectory of home directory

cd ~/Desktop

Change to subdirectory of other user's home directory

cd ~ripley/Desktop