I performed all the steps to install sublime 2 on my Ubuntu 14.04 as shown in this link...
but when I try to perform this command
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
it gives me an output
ln: failed to create symbolic link ‘/usr/bin/sublime’: File exists
and when I try to add Sublime Text to the Unity luncher using this command
sudo sublime /usr/share/applications/sublime.desktop
it gives me an output
sudo: sublime: command not found
Please help me soon. Thank you.
2 Answers
use subl command instead of sublime
Since /usr/bin/sublime already exists, but there is some issue with it, let's get rid of it first:
sudo rm /usr/bin/sublime
Next, we'll create the symlink again:
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
Finally, we'll clear the path cache just in case:
hash -r
You should now be able to run
sublime filename
or
sudo sublime filename
without issues.