1

I performed all the steps to install sublime 2 on my Ubuntu 14.04 as shown in this link... askubuntu.com/questions/172698/how-do-i-install-sublime-text-2-3

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
    The command to start Sublime is subl. To your first error: Maybe you already created a file /usr/bin/sublime, but it isn't executable. – s3lph Oct 11 '14 at 14:52
  • Well thanks for answer. But it didn't help me though. And you are right it isn't executable file. Please guide me. – santa banta Oct 13 '14 at 4:54
  • Make the file executable using sudo chmod +x /usr/bin/sublime Then you should be able to just run sublime to start it. – s3lph Oct 13 '14 at 15:26
2

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.

  • It is working bro....but shell giving me some error like ...........GLib-CRITICAL: Source ID 3212 was not found when attempting to remove it...please help me to find cure for it, thank you. – santa banta Oct 15 '14 at 4:47
  • @santabanta see my answer to a similar question on Stack Overflow for an explanation. Essentially, as long as nothing is crashing, it's no big deal. – MattDMo Oct 15 '14 at 14:49
1

use subl command instead of sublime

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.