If not, simply add this folder to your PATH and save the file. Hopefully, you’ll be able to see something similar to this: Since we created a symlink in the /usr/local/bin folder, we want to make sure that that folder is being checked too. Your PATH contains all the directories that will be checked for executable binaries when you type a command into your Terminal. What you’re looking for is a line towards the top of the file that starts with export PATH=. This should open up your profile in a text editor. Note that in some cases the profile may be called ~/.profile. The final thing you need to do, is to check that your system profile is looking in the right place to see the symlink you have just created.Įnter the following command into your Terminal: Ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime Check your profile Ln -s /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime For Sublime Text 3: You now need to create a symlink called sublime which links the subl CLI to a folder where your system usually looks to execute these binaries. Open /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl Open /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl For Sublime Text 3: InstallationĪssuming you installed Sublime in the Applications folder, the following command should open up the editor when you type it into the Terminal: For Sublime Text 2: It’s a slightly different installation depending on whether you’re using Sublime Text 2 or 3, so I’ll split the two out below in the installaton simply refer to the instructions that are relevant to you. The following instructions are based largely on the original gist on Github by Artero, so credit for this solution should be directed to them and not myself. This is done by hooking into a CLI utility that Sublime provides called subl.
#Install sublime text mac os how to
As I’m working in the OSX Terminal more and more these days, I'm always on the lookout for time-saving shortcuts.Ī really useful tip that I picked up recently from Zander Martineau is how to open up Sublime Text straight from the Terminal.