## For Sublime Text 2

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

## For Sublime Text 3

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

For Sublime Text 2 License Key:

How to install both sublimetext 2 and 3?
1. Download the sublimetext 2 & 3 from their website.
2. Extract the tar+bz2 format
tar -xvjf sublime_text_3_build_3126_x32.tar.bz2 -C /opt
tar -xvjf sublime_text_2_build_2221_x32.tar.bz2 -C /opt

$ vi /usr/bin/subl

/opt/sublime_text_2/sublime_text --class=sublime-text-2 "$@"

$ vi /usr/bin/subl3

/opt/sublime_text_3/sublime_text --class=sublime-text-3 "$@"

Compressed the sublimetext
tar -cvjf sublime_text_2_build_2221_x32.tar.bz2 sublime_text_2