cd(n)

cdn

Change working directory

Usage

cd ?dirName?

Overview

Change the current working directory to dirName, or to the home directory (as specified in the HOME environment variable) if dirName is not given. Returns an empty string. Note that the current working directory is a per-process resource; the cd command changes the working directory for all interpreters and (in a threaded environment) all threads.

Examples

Change to the home directory of the user fred: cd ~fred

Change to the directory lib that is a sibling directory of the current one: cd ../lib

Keywords

working directory

Releases

163 releases since Mac OS X 10.0; the text changed 5 times.

  1. 10.0–10.1.5
  2. 10.2–10.2.8
  3. 10.3–10.3.9
  4. 10.4–10.4.2
  5. 10.4.3–10.5.8
  6. 10.6–26.5

From tcl 152 in macOS 26.5. Parsed by carta from the page's man source.