June 2000
Beginner
704 pages
14h 55m
English
Use the cd (change directory) command to navigate through the Linux file system's directories. Use this command with a directory specification or pathname to move to a specified directory. This command is built in to each Linux shell, and can also be used as a shortcut to quickly move back to your home directory.
$ pwd /home/michael $ cd /usr/bin $ pwd /usr/bin $ cd /home/michael
If you enter the cd command by itself, you'll return to your home directory (specified in the $HOME environment variable). Move up to the next directory by entering two periods and a forward slash (../) with the cd command, like so:
$ pwd /home/michael $ cd ../ $ pwd /home
SEE ALSO
▸To learn more about shell environment variables, ...
Read now
Unlock full access