Sublime Text 2 as Default Editor in Ubuntu 12.04 2

Sublime Text is an awesome text editor. If you’ve never heard of it, you should go


Step 1

Download the tarfile that suits you best and extract it. Here’s the command to extract tar.bz2 files:

Step 2

You’ll get a “Sublime Text 2″ folder after extraction. This folder contains all the files that Sublime Text will need. So we have to move that folder somewhere more appropriate. Like the “/opt/” folder :


Step 3

At some point you’d want to be able to call Sublime Text from the Terminal by just typing “sublime”. To do that, we’ll just create a symbolic link in “/usr/bin” like thus:


Step 4

Now that our files are at the right place, we need to create a launcher in Unity. To do this, we’re going to create a .desktop file in “/usr/share/applications”:


And paste the following content:

As you can see, these lines are quite straightforward. Go ahead and experiment a bit with them.

Step 5

Now you would probably want to open all text files with Sublime Text 2. The easiest way to do that is to open up the file associations list:


And replace all occurrences of gedit.desktop with sublime.desktop.

Enjoy !!

Goto :


2 thoughts on “Sublime Text 2 as Default Editor in Ubuntu 12.04

  1. Reply James Jun 4,2013 7:46 pm

    Excellent guide – thanks very much! 🙂

  2. Reply Dhirendra Jun 27,2013 10:37 am

    thanks. it worked without any glitch.

Leave a Reply