Symlink for Sublime or Atom on a Mac

Did you know there’s an easy way to set up your terminal app to open things in atom or sublime? You just have to create a symlink.

I keep needing this for my students so I’m keeping it here so I can find it!

For Sublime, In a terminal window type:

ln -s /Applications/Sublime\ /usr/local/bin/subl

For Atom, In a terminal window type:

ln -s /Applications/ /usr/local/bin/atom

Then you can open a whole directory from the terminal by typing either

subl .


atom .

or a specific file by typing either

subl yourfilename.js


atom yourfilename.js