How to Open Sublime Text from Terminal in MacOS

Just create a symlink..

Sublime Text is the lightest IDE with GUI someone can ask for, as well as very powerful.

For MacOS just run the command in the terminal:

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

Now if you want to load a folder full of files, like a project

subl .
# or
subl ./myproject/src

Or if you want to load just a file

subl ./readme.md

That’s it, enjoy!

than also run the command

sudo ln -s /Applications/Sublime\ Merge.app/Contents/SharedSupport/bin/smerge /usr/local/bin/smerge

Now if you want to load a folder full of files, like a project

smerge .
# or
smerge ./myproject/src

Just make sure your project has a .git folder!

That’s it, enjoy!

--

--

Full stack developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store