Changing Directories: cd

Changing directories in Unix is just as easy as listing them. While the ls command is used to list the contents of a directory, the cd command is used to change directories. Moving from one directory to another may be necessary if you need to edit a file, delete a file, or perform any variety of tasks. The cd command will also help you exercise your use of other commands and allow you to better navigate the Unix file system.

Using the Unix cd command will let you change directories in a flash, but how do you know where you are and where you want to go? That's where the other commands you have already learned come into play. The pwd command will show you the directory in which you are presently located. The ls command ...

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.