Sublime Text is a most popular, lightweight and smart cross-platform text and source code editor with a Python API, that available for Linux, Windows and Mac OS X. It is really an awesome application for programming and offers a wide range of file types to manage has it supports syntax highlighting for C, C++, C#, CSS, HTML, Java, JavaScript, PHP, Groovy, LaTeX and the list goes on. The user interface is much similar to most famous editor called “vim“.

By default there is no official repository available for Sublime Text 2 and there is no any magical way to install using “yum” or “apt-get” command as you use these command frequently to install packages on your Linux systems.

But due to high volume of users requests, the WebUpd8team created a up-to-date PPA forSublime Text 2 for Ubuntu users. So, here in this article we will show you two methods to install Sublime Text.

At the time of writing this article, Sublime Text 3 beta is available to registered Sublime Text users only at a license costs USD $70. However, now it’s available to all users.

The first method is using source tarball on RHEL, CentOS, Fedora, Debian, Ubuntu andLinux Mint.
The Second method is using PPA on Debian, Ubuntu and Linux Mint.

Method 1: Installing from Source Tarball

The latest stable version can be downloaded from Sublime Text website or you can use the following “wget” command to download the tar-file that suits you better and extract it as shown below.

On 32-Bit Systems

# cd ~
# wget http://c758482.r82.cf2.rackcdn.com/Sublime\ Text\ 2.0.2.tar.bz2
# tar vxjf Sublime\ Text\ 2.0.2.tar.bz2

On 64-Bit Systems

# cd ~
# wget http://c758482.r82.cf2.rackcdn.com/Sublime\ Text\ 2.0.2\ x64.tar.bz2
# tar vxjf Sublime\ Text\ 2.0.2\ x64.tar.bz2
Once unpacked, you will get a directory called “Sublime Text 2″, inside this directory you will see a list files that required by Sublime Text to run. For security reason, we move this folder under “/opt” location.

# sudo mv Sublime\ Text\ 2 /opt/
Next create a symbolic link to call “Sublime Text” from the command line as “sublime”. To do, create a symbolic link under “/usr/bin” as shown below.

# sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime

For Ubuntu Unity Lancher

If you are using Unity and want to add “Sublime Text” to the Unity launcher. Create a “sublime.desktop” file under “/usr/share/applications”.

# sudo sublime /usr/share/applications/sublime.desktop
Then Copy and Paste the following content into it. Save and close.

[Desktop Entry]
Version=2.0.1
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=/opt/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
Install Sublime Text in Ubuntu

If you would like to open all your text files with “Sublime Text“. Open a “defaults.list” file and replace all occurrences of “gedit.desktop” with “sublime.desktop” as shown.

# sudo sublime /usr/share/applications/defaults.list

Method 2: Installing Sublime Text Using PPA

Add WebUpd8team PPA to your Synaptic Manager to install Sublime Text using following steps.

# sudo add-apt-repository ppa:webupd8team/sublime-text-2
# sudo apt-get update
# sudo apt-get install sublime-text
NOTE: As I said the Sublime Text 3 Beta is released, if you would like to install Sublime Text 3, use this following command.

# sudo apt-get install sublime-text-installer
Start Sublime Text

To Launch Sublime Text from command line, call the “sublime” as shown.

# sublime
Install Sublime Text in Debian

That’s It! If you are using any other editor, please do tell us via comment section.

在ubuntu上安装subline的更多相关文章

  1. [异常解决] ubuntu上安装JLink驱动遇到的坑及给后来者的建议

    一.前言 最近将整个电脑格式化,改成了linux操作系统 希望这样能让自己在一个新的世界探索技术.提升自己吧- win上的工具用多了,就不想变化了- 继上一篇<ubuntu上安装虚拟机遇到的问题 ...

  2. Ubuntu上安装Robomongo及添加到启动器

    到目前为止,Robomongo仍是MongoDB最好的客户端管理工具,如需在Ubuntu上安装Robomongo,可直接从官网下载.tar.gz压缩包进行解压,然后直接运行bin目录下的robomon ...

  3. 在 Ubuntu 上安装 Android Studio

    在 Ubuntu 上安装 Android Studio http://www.linuxidc.com/Linux/2013-05/84812.htm 打开terminal,输入以下命令 sudo a ...

  4. Ubuntu上安装Karma失败对策

    在Ubuntu上安装Karma遇到超时 timeout 错误.Google了一下,国外的码农给了一个快捷的解决方案,实测可行,贴在这里: sudo apt-get install npm nodejs ...

  5. 在Ubuntu上安装LAMP服务器

    1.安装Ubuntu上安装LAMP apt-get install lamp-server^ 2.安装过程中设置MySql密码 3.测试 创建index.php var/www/html/index. ...

  6. [译]How to Setup Sync Gateway on Ubuntu如何在ubuntu上安装sync-gateway

    参考文章https://hidekiitakura.com/2015/03/21/how-to-setup-sync-gateway-on-ubuntudigitalocean/ 在此对作者表示感谢 ...

  7. 在Ubuntu上安装JDK、Ant、Jmeter和Jenkins

    一.前期准备 1. 在win7下载VMware.Ubuntu(用迅雷下比较快) 2. 安装完VMware后新建虚拟机,选择iso: 3. 具体配置参考如下,至此Ubantu安装完成 二.在Ubuntu ...

  8. Ubuntu上安装MongoDB(译)

    add by zhj:直接从第四步开始就可以了,而且安装好MongoDB后会自动启动的,不必自己去执行启动命令 原文:https://docs.mongodb.com/manual/tutorial/ ...

  9. Ubuntu上安装ns2-2.34

    Ubuntu上安装ns2-2.34 步骤1 下载ns-allinone-2.34 $ tar zxf ns-allinone-2.34.tar.gz 步骤2 sudo apt-get install ...

随机推荐

  1. 超详细Hexo+Github博客搭建小白教程

    原文链接:超详细Hexo+Github博客搭建小白教程 去年9月的时候开始搭建了第一个自己的独立博客,到现在也稍微像模像样了.很多小伙伴应该也想过搭建一个自己的博客,网上也有一堆详细教程.我在此稍稍总 ...

  2. CSS实现多重边框和内凹圆角

    CSS实现多重边框 <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset=&q ...

  3. 关于如何等待一个元素的出现而不用一些笨拙粗暴的time.sleep()方法

    我相信这是一个非常大众化的需求,我们需要等待某一个元素的出现以此来让我们的脚本进入到下一个Step,这个等待方法最好能够设置超时时间,然后找到后迅速callback.我们也很幸运!如果你仔细看Sele ...

  4. selenium profile remotedriver

    使用 FirefoxProfile FirefoxProfilefp = new FirefoxProfile(); // set something on the profile... Desire ...

  5. selenium googleDrive

    http://chromedriver.storage.googleapis.com/index.html?path=2.1/下载地址 把googledriver.exe 放到google浏览器下目录 ...

  6. ssh代理登录内网服务器

    服务器 192.168.48.81 # client 192.168.48.82 # bastion 192.168.48.83 # private password方式 192.168.48.81 ...

  7. ASP.NET与json对象互转

    这两天写这个xml跟json的读写,心累啊,也不是很理解,请大家多指教 首先来个热身菜做一个简单的解析json 在script里写一个简单的弹窗效果 <script> //script里简 ...

  8. centos6.5_64bit-Tomcat7安装部署

    此次安装系统版本及软件版本 centos6.5-64bit java -1.7.0_45 jdk1.8.0_111 apache-tomcat-7.0.73   一.检查java版本信息        ...

  9. php网站修改默认访问文件的nginx配置

    搭建好lnmp后,有时候并不需要直接访问index.php,配置其他的默认访问文件比如index.html这时候需要配置一下nginx才能访问到你想要设置的文件 直接上代码,如下是我的配置的一份简单的 ...

  10. 如何在markdown中实现缩进,空格,制表符

    参考 https://stackoverflow.com/questions/6046263/how-to-indent-a-few-lines-in-markdown-markup Markdown ...