Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see the current value of my $PATH variable on OS X?

$ $PATH

returns:

-bash: /usr/local/share/npm/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/sbin:~/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin: No such file or directory

This seems quite ugly and might be giving me issues with getting Homebrew up and running as well.

like image 415
Karoh Avatar asked Jan 31 '13 01:01

Karoh


People also ask

How do I find my current PATH variable Mac?

How do I find the PATH variable on a Mac? To find the PATH variable on Mac, open a terminal window and run echo $PATH. After which, the shell will return a list of all the directories currently listed under the PATH environment variable on your Mac.

How do I find the value of a PATH environment variable?

Select Start select Control Panel. double click System and select the Advanced tab. Click Environment Variables. In the section System Variables find the PATH environment variable and select it.

What is the value of your PATH variable?

The PATH environment variable is an important security control. It specifies the directories to be searched to find a command. The default systemwide PATH value is specified in the /etc/profile file, and each user normally has a PATH value in the user's $HOME/.


1 Answers

You need to use the command echo $PATH to display the PATH variable or you can just execute set or env to display all of your environment variables.

By typing $PATH you tried to run your PATH variable contents as a command name.

Bash displayed the contents of your path any way. Based on your output the following directories will be searched in the following order:

/usr/local/share/npm/bin /Library/Frameworks/Python.framework/Versions/2.7/bin /usr/local/bin /usr/local/sbin ~/bin /Library/Frameworks/Python.framework/Versions/Current/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/local/git/bin 

To me this list appears to be complete.

like image 66
HeatfanJohn Avatar answered Oct 23 '22 15:10

HeatfanJohn