I'm trying to create a symbolic link so I can open Sublime Text from the terminal with subl .
by entering in this line from the documentation:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
But I'm getting the error:
No such file or directory
How can I fix this?
It might be the backslash between Sublime and Text.app. I removed the quotations and this worked for me:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /Users/raulv/bin/subl
Most likely you do not have a bin
directory in your home directory (~
). Use this command instead:
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
This will create the symlink in the system /usr/bin
directory, which is already in your path. You need to use sudo
because it's a system directory, meaning you'll need an Administrator password to complete the command. Be very careful when using sudo, as it gives you write access to everything, and you could rather easily nuke your system if you ran, for example:
sudo rm -rf /usr /bin/subl # do NOT do this
which would destroy the entire /usr
hierarchy (notice the space between /usr
and /bin/subl
?).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With