1.到sublime官网下载适合ubuntu的tar.bz2版本http://www.sublimetext.com/
2.解压:tar
xf Sublime Text 2.0.1.
tar
.bz2
3.移动到/usr/lib下,这样做是因为$PATH这个环境变量自动涵盖了/usr/lib这个目录,不用专门去修改环境变量。“\”是转义符
sudo
mv
Sublime\ Text\ 2
/usr/lib/4.使其可在终端使用:
sudo
ln
-s
/usr/lib/Sublime
\ Text\ 2
/sublime_text
/usr/bin/sublime
5.创建可在Unity中使用的图标:
sudo
sublime
/usr/share/applications/sublime
.desktop
然后会打开sublime界面,将下面的内容复制进去:
[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=Unity5.执行
sudo
sublime
/usr/share/applications/defaults
.list