Launch Sublime Text 3 from the Terminal on your Mac

Eureka! I have been searching for a way to launch Sublime Text 3 from the terminal on my Mac (OS X version 10.10.4) for the longest time and finally found a solution today.

I found numerous tutorials and guides online but I kept running into issues for one reason or another. Here’s what worked for me finally in the end:

cd 

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/subl

First, I had to navigate to my home directory so I typed in cd first in my terminal. Then I typed in the second command once I was there.

After the second command, the terminal prompted me to enter in my admin password in order for it to go through but once I did that this finally worked and I was able to open files and folders straight from the command line.

I used this YouTube tutorial for the most part except it still didn’t get me there 100% because I kept getting a permission error. That is when I tacked on sudo at the front of the command and it finally went through.

Leave a comment