O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commands

cd

target_directory

Change directory. This command makes target_directory your current working directory. It is a strong contender for the single most commonly used command in Linux. target_directory may be either a relative path, an absolute path, a shell symbol, or a shell variable.

Example: In the examples on the usage of the cd command presented next, assume that the shell variable $BOB stands for /home/bob. The directory tree is the same as the sample directory tree printed in the front of this chapter:

Starting Directory target_directory Type Example Command Ending Directory
/home/shawkins relative cd linux /home/shawkins/linux
/home/shawkins absolute cd /home /home
/home/shawkins shell symbol cd .. /home
/home/shawkins shell ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required