Installing Sublime Text 2 on Ubuntu (Update)

Sublime Text 2

Well it’s been quite some time since my last blog post. I’ve been really busy with a lot of stuff as well as going on holiday :)

Anyway this week I thought I would install Ubuntu and try and get some apps setup that I just can’t live without. One of the programs that I have been using a lot recently and really really love is Sublime Text 2. If you haven’t tried it yet, you should. It really makes my programming life easier. Plus, it’s multi-platform so you can install it on Mac, Windows and Linux.

Although this tutorial is specifically for Ubuntu users, almost all of it can be used on both Mac and Windows too.

Step 1 : Download it (DUH!)

Since I like to keep my programs on the cutting edge, I suggest downloading the latest dev build of Sublime Text 2. Either grab the 32 bit or 64 bit version for Linux depending on your current system.

Step 2 : Extract it

Once it has downloaded you can either extract it using the terminal or just use the Archive Manager that is built into Ubuntu. I just used the Archive Manager to extract it into a folder in my home directory called Applications. And now you’re basically done. Just go into the Applications/Sublime Text 2 folder and double click on sublime_text. If you prefer to run things via the console then cd into the Sublime Text 2 folder and run

Create a symlink

Now this is one part that I was having some troubles doing. The way that many people said to put the link to it into /usr/bin. However I found that I needed to create the link in /user/local/bin. Open terminal and enter the following:

You can make the name of the link almost anything you want really. So instead of subl you could call it slime or sublime.

Once this link has been created you should now be able to open sublime text via the terminal by just typing:

This will open sublime text. If you want it to open with the current directory you are in just add a space and a dot at the end.

The awesomeness doesn’t stop there!

To add to the awesomeness that is Sublime Text download and install Will Bond’s Sublime Package Control. The easiest way to install it is by opening the console in Sublime Text and running this command:

After it has installed close and reopen Sublime Text and now your can press ctrl + shift + p  and you can now start installing some awesome packages by typing install and pressing enter. This will load the latest list of packages available.

The first one I suggest installing is called Fetch which is brought out by nettuts. Fetch will help you download either single files or an entire package such as html5boilerplate. You can add pretty much any file you like.

Another great one that I have been using is Prefixr. Prefixr helps you add the the browser prefixes to your css. So, for example, you just need to type border-radius, run it through Prefixr, and it will add all the browser prefixes such as -moz and -webkit.

After some great comments on this post I thought I would add an update to include how to add a destop/launcher icon.

Adding a launcher/desktop icon

Create a new file on the desktop called sublime.desktop. You could create this file with Sublime Text if you like.
If you don’t have it open already, open it in Sublime Text and add the following lines to it.

If you are using a different command to open Sublime Text then the one I have been using in this tutorial you can update it in the part that says Exec=subl. Download a nice icon for Sublime Text like this one, and add the path to it in the file here Icon=/path/to/icon. Save the file and drag it into your launcher.

And there you have it! Not only can you do a quick launch from the terminal, but you also have a nice user friendly launcher to open Sublime Text 2.

Your thoughts

Have you tried sublime text yet? Do you have any other packages to suggest? Let me know in the comments.

40 thoughts on Installing Sublime Text 2 on Ubuntu (Update)

  1. I prefer the PPA version as well – easier to deal with, albeit updates can be a day or so behind official ones, so the app bothers you for no reason.

  2. Pingback: Install Sublime Text Manually in Ubuntu / Debian | All Medicated Geniuses

  3. I think what you published made a ton of sense.
    However, what about this? suppose you were to write a killer post title?

    I mean, I don’t wish to tell you how to run your website, however suppose you added a
    headline to maybe grab folk’s attention? I mean Installing Sublime
    Text 2 on Ubuntu | Ed Moore is kinda plain. You could
    look at Yahoo’s front page and see how they create post titles to grab viewers to click.
    You might add a related video or a related picture or two to get
    readers excited about everything’ve written. Just my opinion, it might bring your
    posts a little livelier.

  4. Hey I know this is off topic but I was wondering if you knew of any
    widgets I could add to my blog that automatically tweet my newest twitter updates.

    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would
    have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your
    new updates.

  5. While these scratches are usually harmless, they aren’t
    fairly and annoying someday.
    You can customize them with higher resolution pictures from their galleries,
    or add your personal images!

  6. Many more rights-holders are coming forward representing
    thousands of more intellectual properties nevertheless the verification process for identifying ownership is long and detailed, so we will keep on adding once we go,” added Alki David. As what I said before, Dub Turbo works because your good assistant. AES256 is one in the best disk encryption algorithm that is hard to decrypt.

  7. A fascinating discussion is worth comment. I think that you should publish more on this issue, it might not be a taboo subject but generally people don’t speak
    about these subjects. To the next! Many thanks!!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">