Installing Sublime for Ubuntu/Mint

The easiest way I found recently is:

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text

or for Sublime 3

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

Or you can make it manually:

1. Download Sublime from HERE
2.Extract the rar archive: tar -jxvf Sublime\ Text\ 2\version.tar.bz2
3. Move the folder to whichever folder you want –

sudo mv Sublime\ Text\ 2 sublime
sudo mv sublime /opt/
cd /opt
sudo chown -R root:root sublime
sudo chmod -R +r sublime

4. Create executable here: sudo gedit /usr/bin/sublime_text
5. Parse the poth to sublime folder in it:

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export SUBLIME_HOME="/opt/sublime"

$SUBLIME_HOME/sublime_text "$*"

6. Chmod it – sudo chmod 775 /usr/bin/sublime_text
7. Add a desktop file to display the icon in the menu – sudo gedit /usr/share/applications/sublime.desktop
8. Paste the following desktop entry in it:

[Desktop Entry]
Encoding=UTF-8
Name=Sublime Text
Comment=Sublime Text 2
Exec=sublime_text
Icon=/opt/sublime/Icon/256x256/sublime_text.png
Terminal=false
Type=Application
Categories=GNOME;GTK;Utility;TextEditor;
StartupNotify=true

9. Enjoy 🙂

Thanks to Coderwall

You may also like...