1.在官网下载Sublime Text 2:http://www.sublimetext.com/2 。我的Ubuntu是64位的12.10,选择Linux 64bit。
2.下载好的文件是tar.bz2压缩文件,解压之。(下载文件名为:Sublime Text 2.0.1 x64.tar.bz2)
sudo tar xf Sublime\ Text\ 2.0.1\ x64.tar.bz2
3.移动解压文件到/opt/文件夹下
sudo mv Sublime\ Text\ 2 /opt/
4.在终端中添加sublime命令启动Sublime Text 2
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/binsublime
5.添加到桌面Dock启动栏
sudo sublime /usr/share/applications/sublime.desktop
加入以下内容:
[Desktop Entry] Version=1.0 Name=Sublime Text 2 GenericName=Text Editor Exec=sublime Terminal=false Icon=/usr/lib/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
参考文章:http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/