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
If you want to remove any installed Sublime Text packages:
sudo apt-get --purge remove sublime-text*
Run Sublime-Text on terminal
subl
To make your sublime text as a default editor follow as below
Right-click on the file you wish to open in the Sublime editor. Now, you could find the application “Sublime text” listed in the menu. Also, you could set the editor as default for the file-type by setting it in the file’s properties.