Last Updated: February 25, 2016
·
927
· fusion94

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl. This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal people. If this following line opens Sublime Text for you, then you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

If this works for you then next do this:

ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

This will simply create a symlink called sublime between the subl binary stashed in the Sublime application package, and a folder where your system usually looks for binaries to execute (launch).