6.5.1.7 The CD Statement



The syntax for the cd command is the same in UNIX and for the built-in menu command version. It is as follows:

cd [ directory ]

When the optional argument is supplied with the command, both the UNIX and menu version of cd change the current working directory to directory. When the optional argument is not supplied, the menu cd command works a little differently than the UNIX cd(1) command.

In UNIX, when no arguments are passed, the current working directory is changed to the directory specified by the environment variable HOME. The built-in menu command cd, instead, prints the current working directory.