How to Install Sublime Text 3 on CentOS 7 Linux

In This Article we discuss How to Install Sublime Text 3 on CentOS 7 Desktop.

Sublime still do not provide distinct software repository or RPM package for CentOS 7. But Linux 64 bit version of sublime text editor works ok with CentOS 7.

Install Sublime Text editor on CentOS 7 Linux
Step One

Download Sublime Text Editor for Linux CentOS 7

Go to following URL https://www.sublimetext.com/3 and download the 64bit tarball which is marked for the other Linux distributions. This is a tar file which has been compressed using the bzip2 format.

Step Two

Extract the Downloaded tar File

Now we need to extract the tar file, which contains the everything we need to run sublime 3 on CentOS 7. We will extract the tar file into the /opt directory So all users in our system can use the Sublime text editor.

tar -jxvf sublime_text_3_build_3103_x64.tar.bz2 -C /opt/

Step three

Add sublime text 3 to the CentOS 7 Application Menu

Finally, we want to add sublime 3 to the CentOS 7 Application menu.

Create a text file called “sublime_text_3.desktop” inside the /usr/share/application directory.

vim /usr/share/applications/sublime_text_3.desktop

Then add the following entries and save the file.

[Desktop Entry]

Version=1.0

Type=Application

Name=Sublime Text

GenericName=Text Editor

Comment=Sophisticated text editor for code, markup and prose

Exec=/opt/sublime_text_3/sublime_text %F

Terminal=false

MimeType=text/plain;

Icon=/opt/sublime_text_3/Icon/128x128/sublime-text.png

Categories=TextEditor;Development;

StartupNotify=true

Actions=Window;Document;

Now you should see the sublime 3 text editor launcher on the application menu under the programming sub category.

CentOS sublime 3 menu icon

Add Desktop Shortcut

To add CentOS 7 Desktop shortcut, create a text file called sublime3.desktop on your desktop and add the following entries.

#!/usr/bin/env xdg-open

[Desktop Entry]

Version=1.0

Type=Application

Name=Sublime Text

Exec=/opt/sublime_text_3/sublime_text %F

Terminal=false

Icon=/opt/sublime_text_3/Icon/128x128/sublime-text.png

Then double click to run the file and Click on Mark as Trusted button, when you get the “Untrusted application launcher” dialog.

Untrusted application launcher

Once you click the Mark as Trusted button, Shortcut to the sublime text editor will appear on your CentOS Desktop.

Sublime 3 Desktop Shortcut CentOS 7

OK then! this is the end of this article. You can see how easy it was to install sublime text editor on Linux CentOS 7.