Manually Installing Sublime Text 2 On Ubuntu


Sublime is one of the best of the text editor I have used. One of the best things about it is that it’s cross platform but it doesn’t include an installer for Linux.


Download a copy of the Sublime Text program. This comes in a zipped format.

In the terminal go to the folder where the download is and extract it:
cd Downloads
tar xf Sublime\ Text\ 2.0.2\ x64.tar.bz2

Move it to a system folder so it’s accesssible to all users:
sudo mv Sublime\ Text\ 2 /opt/Sublime\ Text

Create symlink so that sublime can be started in the commandline with the word “sublime”:
sudo ln -s /opt/Sublime\ Text/sublime_text /usr/bin/sublime

Create a desktop file so that it can be accessed in the apps menu:
sudo sublime /usr/share/applications/sublime_text.desktop

Sublime should open a blank file. Copy and paste the following:

[Desktop Entry]
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/Sublime\ Text/sublime_text %F

[Desktop Action Window]
Name=New Window
Exec=/opt/Sublime\ Text/sublime_text -n

[Desktop Action Document]
Name=New File
Exec=/opt/Sublime\ Text/sublime_text –command new_file

To change gedit to sublime as the default editor, do a find and replace on /usr/share/applications/defaults.list and replace any gedit.desktop with sublime_text.desktop
sudo sublime /usr/share/applications/defaults.list


How to install Sublime Text 2 on Ubuntu 12.04 (Unity)

How do I make Sublime Text 3 the default text editor [duplicate]

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Linux, Software and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

All comments must go through an approval and anti-spam process before appearing on the website. Please be patience and do not re-submit your comment if it does not appear.