Name

cd — Change present working directory

Synopsis

cd [directory]

Options

directory

Directory to set as present working directory.

Description

This changes the present working directory of the shell to the specified directory, the change may be relative to the current directory or an absolute path.

Example 56. Using the cd and ls commands to navigate a filesystem

This shows using the cd command to change into the boot directory of the first hard drive and then perform a relative move into the var directory.

>cd (hd0)/boot
>ls
config-2.6.13-simtec1
vmlinuz-2.6.13-simtec1
>cd ../var
>ls
lib
cache
backups
local
lock
log
run
spool
tmp
opt
mail
>