By default when you open your Terminal you’ll be inside the
/Users/UserName directory. But what if you need access to the Home directory of your Mac?
To launch your Mac’s Home directory, open your Terminal and run this command:
By default, your Home directory provides access to the following directories: Application, Documents, Movies, Music, Pictures, Desktop Downloads.
Now you can launch either of these folders by running the
open x command. For example, if you want to open your Music folder, you run:
These types of commands are not case-sensitive, so you don’t have to type
open Music, you can just type
You can also launch applications directly via your Terminal by running a single command. For example, to launch the Pages app, run this command:
The only problem with using direct, single commands like the above is that it requires you to remember the exact directory path to the app or directory you want to open.
Here’s a practical tip that will save you a lot of time:
When you start typing inside your Terminal, you can use your keyboard’s Tab key to auto-complete directory or file names.
So if you start by typing:
open /ap and then immediately hit tab, it will finish the directory name to
open /application, then you can add a forward slash
/ and type the initial letters of the app you want to open, for example,
sa for Safari, and hit tab to auto-complete the word.
Here’s a quick clip of me doing the above: