sudo: sublime: command not found

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.

3

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.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like