1、在官方下载相应的版本(我的是Ubuntu64位系统)得到.tar.bz2文件,然后解压:
tar xf Sublime\ Text\ 2.0.1\ x64.tar.bz22、解压后得到Sublime Text 2文件夹,不用什么编译make了,其实它就可以运行了,然后直接把它移动端/usr/lib/下面去:
sudo mv Sublime\ Text\ 2 /usr/lib/
3、在终端中,添加sublime快捷命令:
sudo ln -s /usr/lib/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
4、现在我们可以在终端中输入:sublime打开sublime了,下面我们添加一个图标吧(/usr/share/applications):
sudo sublime /usr/share/applications/sublime.desktop
加入一下内容:
[Desktop Entry] Version=1.0 Name=Sublime Text 2 # Only KDE 4 seems to use GenericName, so we reuse the KDE strings. # From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. 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