##Add the PPA and install Sublime Text 2 in Ubuntu

###Shell代码
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update

###Shell代码
sudo apt-get install sublime-text-2-beta
or
sudo apt-get install sublime-text-2-dev

##右键菜单open with增加Sublime Text2

第二步安装了后会生成 /usr/share/applications/sublime-text-2.desktop 
sudo gedit ~/.local/share/applications/mimeapps.list 
参考gedit增加一行 
text/plain=sublime-text-2.desktop; 

##增加别名
gedit ~/.bashrc
增加以下:

#Sublime Text 2 
alias sub='sublime-text-2' 

###单独安装包下载:http://www.sublimetext.com/