Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save archerslaw/3b6b2293edc20e946113 to your computer and use it in GitHub Desktop.
Save archerslaw/3b6b2293edc20e946113 to your computer and use it in GitHub Desktop.
Install Sublime Text (a Text Editor) in RHEL_CentOS_Fedora and Debian_Ubuntu.
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.
- 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
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment