3.6 Directory Navigation and Control
Syntax
cd [directory]
Examples
cd (also chdir in some shells) change directory
cd changes to user's home directory
cd / changes directory to the system's root
cd .. goes up one directory level
cd ../.. goes up two directory levels
cd /full/path/name/from/root changes directory to absolute path named (note the leading slash)
cd path/from/current/location changes directory to path relative to current location (no leading slash)
cd ~username/directory changes directory to the named username's indicated directory (Note: the ~ is not valid in the Bourne shell; see Chapter 5.)