Macos – Permission denied when trying to make sublime text shortcut

macosterminal

So I just started getting into using terminal to manage files etc, and I was trying to setup my sublime text shortcut using this line of code:

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

However, when I try to do this it says Permission Denied and I have no idea why. I am using a Mac running Mac 10.10.2.

Best Answer

For sublime text 3:

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