Setting $PATH for Sublime Text on Mac


Just a quick one. Been trying to get a decent PHP linter without going to a full on IDE – decided to just stick with Sublime Text.

In order to get some linters, and packages working, Sublime Text needs usr/local/bin to be in your path, and to know your path.

I’m using Sublime Linter with SublimeLinter-php.

You can check what’s in your path by typing the following into your terminal.

echo $PATH

Some commands run by Sublime Text are unable to find non-system binaries, including those installed by homebrew and MacPorts if you’re not launching from the terminal with


Note: To launch Sublime Text from your terminal, you’ll need to set it with:

sudo ln -s "/Applications/Sublime" ~/bin/subl

Anywhoo, I fixed the issue by adding the following in user preferences.

(Sublime Text > Preferences > Settings – User)

 "additional_path_items": ["~/usr/local/bin"],

You can even add other paths such as ~Desktop or ~/usr/bin, just separate it out with a comma like this:

 "additional_path_items": ["~/usr/local/bin", "~/wherever"],

Many thanks to [int3h’s repo and notes on GitHub](

Leave a Reply

Your email address will not be published. Required fields are marked *