I've installed Sublime Text 2 on my Ubuntu linux VM. The executable appears to be in /opt/sublime_text_2.

When I click on sublime_text executable it opens a new terminal window and does not open sublime text.

If I enter from the terminal: /opt/sublime_text_2/sublime_text a new terminal window pops up with the following:

/opt/sublime_text_2/sublime_text --class=sublime-text-2 "$@"

and Sublime Text does not open

  • How did you install it? Anyway, I would add this as an answer, but after installing Sublime Text 2, I was able to open it just by running sublime-text. – Wilf Mar 6 '14 at 17:19
  • Have you tried running it from the dash? Seems like you installed it from their website. – Seth Mar 6 '14 at 18:20
  • you could use sublime text 3, it's available in a deb package – Lynob Mar 7 '14 at 18:25

I'd suggest re-installing Sublime Text from scratch. I highly recommend using Sublime Text 3, as it has many new features and bug fixes that aren't in ST2, and many plugins available through Package Control are moving to ST3-only versions to take advantage of the additional features. Also, ST3 is available as a .deb for Ubuntu, making installation a 1-step process.

To install ST3, go to the download page and select Ubuntu 64-bit or Ubuntu 32-bit, depending on your system. After downloading, go to your Downloads directory in your terminal and run

sudo dpkg -i sublime-text_build-3059_amd64.deb


sudo dpkg -i sublime-text_build-3059_i386.deb

depending on the version you downloaded. It will install everything in /opt/sublime_text, will place a sublime_text.desktop file in /usr/share/applications (and put an icon in the Unity launcher, IIRC), and will also create /usr/bin/subl for starting Sublime from the command line.

If for some reason you absolutely need to use ST2, then reinstall by following these steps:

  1. run sudo rm -r /opt/sublime_text_2 to remove the old directory.
  2. Go to http://www.sublimetext.com/2 and download either the Linux 32-bit or Linux 64-bit file, depending on your system.
  3. In your terminal, determine the name of the file you downloaded (either Sublime Text 2.0.2.tar.bz2 or Sublime Text 2.0.2x64.tar.bz2) and run

    tar jxvf "Sublime Text 2...tar.bz2"

    to unpack the archive and create a directory named Sublime Text 2.

  4. Run

    sudo mv "Sublime Text 2" /opt/sublime_text_2

    to move the directory to the proper location and rename it to something without spaces.

  5. Double-check that /usr/local/bin is in your PATH by running

    echo $PATH

    then create a subl shortcut by running

    sudo ln -s /opt/sublime_text_2/sublime_text /usr/local/bin/subl

You should now be able to start Sublime correctly from the command line.


How did you installed Sublime Text 2?

Try to do a link of the binary to the /usr/bin:

sudo ln -sf /opt/sublime_text2/bin/sublime_text2 /usr/bin/

Then launch Sublime Text from the terminal as your normal user, and see if it shows any errors:

$ sublime_text2

My bad, it was calling sublime text 2. I though it was opening up a new terminal, but actually it was in fact Sublime Text 2 with the bin script. Sorry!

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.