Navigating Folders and Files with the Command Line in OS X

Just as you can use the Finder application for navigating the various files and folders across your hard drive in OS X, you can also use the Terminal application, using typed commands and an all-text interface. In this post, we’ll show you how it works, and how much more efficient you can be once you’ve learned the commands.

If you remember DOS operating systems from the 80s and 90s with something less than nostalgia, you might worry we’re taking a step back. This couldn’t be farther from the truth. Mastering command-based navigation is one of the easiest steps you can take toward becoming a true power user, and while you may miss of Apple’s eye candy at first, you’ll find that you can achieve basic file operations much more quickly, and later access advanced controls and settings that do not have a GUI counterpart.

To learn all about OS X under the hood, and how to make your machine operate more efficiently and securely, check out our new OS X: Beyond the Basics tutorial video course, from which the lesson below has been adapted.

Common Commands

To help get you started, here’s a list of the most common commands and what they do. To see them used in real time and follow along, watch the video at the bottom of the post.

LS stands for list, and it will present you with a basic list of all files and folders within the folder you are currently in.

ls -l
Adding -L to the ls command provides a detailed list of the files and folders within your directory, such as the date modified, size, and current permissions


PWD stands for the present working directory, and entering this command will tell you which folder on your drive you are currently in. By default, Terminal starts you in the Home directory, which is your user folder where your Documents, Downloads, and Pictures are stored, among others.

CD stands for change directory, and this is the primary command for navigating around your drive. Simply enter cd, space, and then the destination you’d like to go to. To go to your documents folder, for example, you can type cd ~/Documents/

The ~ symbol, or tilde, represents your home directory, and can be used as a shorthand for the folder at any time.

MKDIR stands for make directory, and this is how you make a new folder within the directory you’re currently in. Simply type the name of the new folder after the mk dir command to create the folder, like so: mkdir Vacation


In this clip, course author Chris Tarnowieckyi goes through the commands above and shows you even more. It’s from Chapter 5 of the full OSX: Beyond Basics course.



Save $50 when you sign up for an annual Learning Library account Learn More