Changing Directories with cd

Written by Chris Gregg, with modifications by Nick Troccoli

Click here for a walkthrough video.

The cd command is used to change the directory where you are currently working. The command accepts absolute or relative paths, and you will use it every time you log onto the myth computers.

If you are someplace in the filesystem and you want to go down a level into a folder, you can do this:

$ ls
file2.c  Makefile  myfile.txt  MyFolder
$ cd MyFolder
$ ls
item1.txt  item2.txt

To change to your home directory:

cd ~



To change to the parent directory:

cd ..

To change to a sibling directory:

cd ../siblingName