Check the PATH of your Mac with echo $PATH

Aug 31, 2010 - Leave a Comment

Anytime that you run a command through the Terminal directly by a command name like ls or dscacheutil, your Mac is looking through a series of directories for that command to exist. This list of directories is called the PATH, and it’s a carry over from the unix underpinnings of Mac OS X. As you may have guessed, checking your PATH in Mac OS X is the same as it is in most other unix variants:

echo $PATH

Executing that command, you’ll see something like:
$ echo $PATH

The directories listed are those that are searched for commands. So the next time someone asks you if a directory is in your path, now you know where to look.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Manish Patel in Command Line, Mac OS X

Leave a Reply


Shop for Apple & Mac Deals on

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates