I've tried three different ways to create a symbolic link to Sublime Text on my Mac and, after restarting terminal each time, it still keeps telling me command not found. I'm using a Mac with Yosemite (OSX Yosemite, 10.10). How can I create a symbolic link so I can open Sublime with the sub
command?
One
ln -s 'Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl' /bin/sub
Two
ln -s "Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" /bin/sub
Three (no quotes)
ln -s Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /bin/sub
/Applications/…
, as pointed out in the answer, and you need root privileges to write in/bin
(hencesudo
). The residual question is whether it is sufficient to run the executable like that. Are you sure you don't want a shell script that does something likeopen "/Applications/Sublime\ Text.app"
instead as the contents of the file in/bin
?