/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
(OS X get's your path from those files. If the first one exists it grabs that path then it moves on to the next file to get more information and so on... For more information go to: http://ss64.com/osx/syntax-bashrc.html
Look for ~/.bash_profile
etc... until you see where your path is set. MOST of the time your path is normally set in ~/.bash_profile
so check that file first and if it's not in there but in another, change it over to ~/.bash_profile
It is possible that none of these files exists in which case homebrew will complain when you run command brew doctor
that /usr/local/bin is not ahead of /usr/bin/. Edit your ~/.bash_profile
to satisfy both homebrew and clamxav.
To make things as simple as possible and fix your problem, locate ~/.bash_profile
and:
No path or no ~/.bash_profile
: If you have no Path, open or create the file and input the following line: export PATH=/usr/local/bin:/usr/local/sbin:$PATH
If you need to create the file you can do so with terminal.app or even textedit but i would suggest terminal.
- Open Terminal.app -> when prompted run:
cd ~
to get to your home directory although you should be there.
touch .bash_profile
which creates the empty file.
pico .bash_profile
-> Now at this screen paste: export PATH=/usr/local/bin:/usr/local/sbin:$PATH
- Once you've inserted the path simply press the Key:
Enter
to save and Control + X
to exit. -> lastly you might as well update bash with the command: source .bash_profile
If ~/.bash_profile
exists with a path but /usr/local/sbin is not included, add it by appending /usr/local/sbin/
to any part, probably a good idea to put it after /usr/local/bin:
directories are separated by semi-colons. Make sure to keep the format consistent.
To make sure /usr/local/sbin is in your path open terminal and run: echo $PATH
you should see /usr/local/sbin somewhere in the output.