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. Unity Shader 学习笔记(一)

    _MainTex_ST (1)简单来说,TRANSFORM_TEX(tex,name) (tex.xy * name##_ST.xy + name##_ST.zw)主要作用是拿顶点的uv去和材质球的t ...

  2. 织梦上传webp格式图片

    织梦cms如何添加其他格式的图片呢? 这里以webp为类来实现一下如何让织梦支持webp 1.修改系统设置让织梦(dede)支持该图片格式,比如:webp(新图片格式) 系统->系统基本参数-& ...

  3. iis 部署网站常见问题

    环境IIS6.0,win2003server 首先打开iis,左边菜单选中”Web服务扩展“,讲Active Server Pages 和 ASP.NET v2.0.50727设置为允许 1.创建网站 ...

  4. Strut2_声明式异常处理

    Service 往外抛异常 public List<Category> list() throws SQLException{ Connection conn = DB.createCon ...

  5. SonarQube代码质量管理平台介绍与搭建

    前 言 1.SonarQube的介绍 SonarQube是一个管理代码质量的开放平台. 可以从七个维度检测代码质量(为什么要用SonarQube): (1) 复杂度分布(complexity):代码复 ...

  6. python3基础13(format的使用)

    #!/usr/bin/env python# -*- coding:utf-8 -*- from string import Templatedict={'name':'python','age':2 ...

  7. To my dear friends in SFAE

    To my dear friends in SFAE, 这不是farewell,我还在西门子大家庭.2018年1月份我会转到SLC MCBU.在SFAE十年,一些敢想,唠叨唠叨~ 十年弹指一挥间.记得 ...

  8. IOS tableView的性能优化(缓存池)

    使用缓存池(标识类型) 1.通过 一个 标识 去 缓存池 中寻找可循环得用的cell 2.如果缓存池找不到可循环得用的cell:创建一个新的cell(给cell贴个标识) 3.给cell设置新的数据 ...

  9. 计算时间 相加,相减 的方法,TimeSpan 数据转换

    #region Time calculation method public static string DelayTypeTime_1(DateTime ArrivalTime_1, DateTim ...

  10. Hubtown(最大流)

    Hubtown 时间限制: 1 Sec  内存限制: 128 MB提交: 23  解决: 11[提交] [状态] [讨论版] [命题人:admin] 题目描述 Hubtown is a large N ...