參考原文:web
http://www.codeproject.com/Articles/582849/InstallingplusSublimeplusTextplus-plusonplusLinuxpsublime-text
sublime不能從軟件源裏直接安裝,但能夠經過第三方源來安裝,下面介紹兩種方法:app
第一種方法:this
Download the Sublime Text 2 & Extract it:code
32位:cdn
$ wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.tar.bz2blog
tar vxjf "Sublime Text 2.0.1.tar.bz2" ip
64位:get
$ wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64.tar.bz2it
tar vxjf "Sublime Text 2.0.1x64.tar.bz2"
Add a Sym link:
$ sudo ln -s "~apps/Sublime Text 2/sublime_text" /usr/bin/sub1
這種方法雖然能夠用,但之後的更新版本不方便升級,因此推薦另外一種方法。
第二種方法:
這種方法須要添加ppa源,若是不能添加請參考附錄裏的方案
$ sudo add-apt-repository ppa:webupd8team/sublime-text-2
$ sudo apt-get update
$ sudo apt-get install sublime-text
If you are installing the Sublime Text 3 Beta as discussed in the update above, use this command instead of apt-get install sublime-text:
$sudo apt-get install sublime-text-installer
$ sudo cp /usr/bin/sublime-text /usr/bin/sublime-text
$ sudo cp /usr/bin/sublime-text /usr/bin/sub1
如今就能夠使用sublime text了。
附錄:在debian下添加ppa
參考原文:
https://blog.anantshri.info/howto-add-ppa-in-debian
1.Download file
$ wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
2.Save this file in /usr/sbin/
$ cp add-apt-repository.sh.txt /usr/sbin/add-apt-repository
3. Change permissions to execute
$ chmod o+x /usr/sbin/add-apt-repository
4. Change ownership to root
$chown root:root /usr/sbin/add-apt-repository
5. Now when ever you need to execute command type
$ sudo add-apt-repository ppa:ppa-name