.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\" This code is derived from software contributed to Berkeley by
.\" the Institute of Electrical and Electronics Engineers, Inc.
.\" %sccs.include.redist.man%
.\" @(#)cd.1 8.1 (Berkeley) %G%
.Nd change working directory
is an absolute or relative pathname which becomes the new working
The interpretation of a relative pathname by cd depends on the CDPATH
environment variable (see below).
The following environment variables affect the execution of cd:
operand does not begin with a slash (/) character, and the first
component is not dot (.) or dot-dot (..),
searches for the directory relative to each directory named in the
variable, in the order listed.
The new working directory is set to the first matching directory found.
An empty string in place of a directory pathname represents the current
If the new working directory was derived from
it will be printed to the standard output.
is invoked without arguments and the
environment variable exists and contains a directory name, that directory
becomes the new working directory.
for more information on environment variables.
utility exits 0 on success, and >0 if an error occurs.
command is expected to be