O'Reilly logo

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition by Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing Directories with cd

Use the cd command to move within the file system from one directory to another. It might help you remember this command to think of it meaning “change directory.” The most basic usage of cd is this:

matthew@seymour:~$ cd somedir

That looks in the current directory for the somedir subdirectory, and then moves you into it. You can also specify an exact location for a directory, like this:

matthew@seymour:~$ cd /home/matthew/stuff/somedir

You can also use the cd command with several shortcuts. For example, to quickly move up to the parent directory, the one above the one you are currently in, use the cd command like this:

matthew@seymour:~$ cd ..

To return to your home directory from anywhere in the Linux file system, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required