cd


Change to another working directory.

Format

   cd [directory]

Summary

When you execute the cd command and specify a directory, that directory becomes the working directory. If you do not specify a directory on the command line, cd makes your home directory the working directory.

Arguments

The directory is the pathname of the directory that you want to become the working directory.

Examples

The following command makes your home directory become the working directory.

z123456@turing:~/CS241/Assign1$ cd

The next command makes the /home/turing/z123456/bin directory the working directory. The pwd command verifies the change.

z123456@turing:~/CS241/Assign1$ cd ../../bin
z123456@turing:~/bin$ pwd
/home/turing/z123456/bin