Sublime Text is an awesome text editor. If you’ve never heard of it, you should check it out right now.
I’ve made this tutorial because there’s no installer for the Linux versions of Sublime Text. While that’s not a real problem, I feel there is a cleaner way to go around this. Also, this post will show you how to integrate Sublime Text to Unity (which, I’m glad to report, has now matured into a fully functional user interface). So let’s get on with this. Here is my how to install Sublime Text on Ubuntu tutorial.
[This tutorial has been updated following feedback from AskUbuntu. Also, you need to do these steps using your login. Do not start by typing “sudo -s”!]
Step 1
Download the tarfile that suits you best and extract it. Here’s the command to extract tar.bz2 files:
tar xf Sublime\ Text\ 2.0.1\ x64.tar.bz2
You’ll notice that I got the 64-bit version. The reason is that it’s lightning fast. So, go for that if you can!
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 :
sudo mv Sublime\ Text\ 2 /opt/
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:
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
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”:
sudo sublime /usr/share/applications/sublime.desktop
And paste the following content:
[Desktop Entry]
Version=1.0
Name=Sublime Text 2
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Text Editor
Exec=sublime
Terminal=false
Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png
Type=Application
Categories=TextEditor;IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=sublime -n
TargetEnvironment=Unity
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:
sudo sublime /usr/share/applications/defaults.list
And replace all occurrences of gedit.desktop with sublime.desktop. Tada ! There you go. You now have Sublime Text 2 installed on Unity on Ubuntu 12.04, like a pro. Here are some screenshots:



Pingback: » Як заставити VLC Media player відкриватись в одному вікні Замітки програмуючого програміста :)()
Pingback: Sublime Text 2 telepítése | Bólogatás()
Pingback: Instalando sublime text 2 no ubuntu 12.04 (unity) | Daniel Lemes()
Pingback: Ficando Zen com Sublime | Thiago Galbiatti Vespa()
Pingback: How to install Sublime Text 2 on Ubuntu 12.04 (Unity) | A Place For Poor Examples()
Pingback: Sublime Text 2 | MPCA's blog()
Pingback: Apple Town Prince » Blog Archive » Ruby on Rails Development Setup()
Pingback: tonyfy()
Pingback: Sublime Text 2 介绍 | 东东东()
Pingback: How do I install Sublime Text 2 in Ubuntu 12.04? | A Quest for Technical Expertise()
Pingback: Create a Sidebar launcher for Sublime Text 2 in Ubuntu Unity | saintsjd()
Pingback: Vim和Emacs的替代工具:Sublime Text | EvilCode 邪恶代码()
Pingback: Install Package Control in Sublime Text 2 | GregPike.net()
Pingback: Instalar Sublime Text no Ubuntu 12.04 | Desenvolvimento Livre()
Pingback: Emergency List « Il Rifugio dei Corsari()
Pingback: ほたるのゆき » Linux 設定 Sublime Text2()
Pingback: Important Links Regarding Ruby – Jyothi()
Pingback: Ubuntu'da Sublime Text 2 Kullanmak | Hakan Aktaş()
Pingback: Sublime Text 2 | HtutMyat()
Pingback: ubuntu 12.04 完美安装sublime text2 【整理】 | web前端,杭州小白的个人博客,小白的个人博客()
Pingback: How to install Sublime Text 2 on Ubuntu 12.04 (Unity) | Technically Wrong -()
Pingback: Ubuntu’ya Sublime Text 2 Kurmak | Murat Yüksel()
Pingback: Sublime Text 2 on Ubuntu 12.10 | tobyw4n()
Pingback: Instalar Sublime Text 2 en Ubuntu 12.04 utilizando Unity | Junior Developer [the blog]()
Pingback: 在ubuntu12.04(Unity桌面)中安装Sublime Text 2 | Zhoutall()
Pingback: Приложения по умолчанию в Ubuntu | nadyarnv()
Pingback: How to install Sublime Text 2 On Ubuntu 12.04 Unity | aginanjarm()
Pingback: Установка Sublime Text 2 в Ubuntu Linux | zlovolsky blog()
Pingback: A long weekend with Ubuntu - Colorblind Programming()
Pingback: SublimeText، ادیتوری که عاشقش میشی | اشکوب()
Pingback: Sexy code snippet management? I take this once please! | GeneralCarto()
Pingback: Menjadikan Sublime Text Sebagai Default Text Editor Di Ubuntu | MusaAmin.Web.ID()
Pingback: Installing and Using Sublime Text In Ubuntu | OMG! Ubuntu!()
Pingback: Cómo Instalar Sublime Text 2 en Ubuntu Unity | Otro Espacio Web Blog()
Pingback: How to associate file types with Sublime Text 2? | WyldePlayground.netWyldePlayground.net -()
Pingback: How to associate file types with Sublime Text 2? | Ubuntu InfoUbuntu Info()
Pingback: Bash Script for Installing Sublime Text 2 on Linux | snwh.org | blog()
Pingback: معرفی نرم افزار : لذت تایپ با Sublime Text | Blog EmergencyTech()
Pingback: How to add Sublime text to dash board | WyldePlayground.netWyldePlayground.net -()
Pingback: How to add Sublime text to dash board | Ubuntu InfoUbuntu Info()
Pingback: How to remove Sublime from Ubuntu 12.04 | WyldePlayground.netWyldePlayground.net -()
Pingback: How to remove Sublime from Ubuntu 12.04 | Ubuntu InfoUbuntu Info()
Pingback: How do I install Sublime Text 2? | Ubuntu InfoUbuntu Info()
Pingback: Run program in terminal | Ubuntu InfoUbuntu Info()
Pingback: Run Galfit in terminal | James n Sheri.comJames n Sheri.com()
Pingback: install sublime 2 on ubuntu 12.04 | mostran wiki()
Pingback: How to install SublimeText 2 on Ubuntu | gabconcepcion()
Pingback: การลง Sublime Text 2 บน Ubuntu 12.04 | Priesdelly's Blog()
Pingback: Mulog | Ubuntu下安装SublimeText2()
Pingback: 11 Python IDEs for Linux()
Pingback: How do I install Sublime Text 2? | Ask Ubuntu()
Pingback: Sublime Text 2 on Ubuntu | Michał Urbański Blog()
Pingback: Undoing Sublime Installation | Ubuntu InfoUbuntu Info()
Pingback: การลง Sublime Text 2 บน Ubuntu 12.04 | Heartdisc()
Pingback: finally installed sublime text | Nothing Useful Here()
Pingback: Installer un Textmate like | Mac2linux()
Pingback: Web Development Tools for Linux & How to Install Them - News Press()
Pingback: Web Development Tools for Linux & How to Install Them | Linux()
Pingback: Manually Installing Sublime Text 2 On Ubuntu | Danny Tsang()
Pingback: Sublime Text — 跨平台的專業文字編輯器 | G. T. Wang()
Pingback: How to associate file types with Sublime Text 2? - TecHub()
Pingback: How to remove Sublime installed using the website instructions? - TecHub()
Pingback: Sublime | SZTR()
Pingback: Ubuntu:How do I install Sublime Text 2/3? – Ubuntu Linux Questions()
Pingback: Ubuntu:How to associate file types with Sublime Text 2? – Ubuntu Linux Questions()
Pingback: How do I install Sublime Text 2/3? - ubuntutextbook()
Pingback: Linux: Installing Sublime Text Editor – Doctor Henry Blog()
Pingback: Make Install Error 2 Ubuntu()