How to install Sublime 3 on CentOS 7 / RHEL 7?

13,274

Solution 1

Here are the Steps:
Step 1: Download Sublime: You can either download from their website or use the wget as I did:

$ cd ~/Downloads
## On 32bit
$ wget https://download.sublimetext.com/sublime_text_3_build_3126_x32.tar.bz2

## On 64bit
$ wget https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2

Step 2. Extract Sublime package (example to /opt directory)
You can store Sublime at any place you want. Here, I saved under /opt directory.

## On 32bit
$ sudo tar -vxjf sublime_text_3_build_3126_x32.tar.bz2 -C /opt
## On 64bit
$ sudo tar -vxjf sublime_text_3_build_3126_x64.tar.bz2 -C /opt

Step 3. Now, let’s make a symbolic link to the installed Sublime3 so that we can run the same from command line

# sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime3

Step 4. Now, let’s test whether the Sublime3 is installed correctly or not.
Type sublime3 in command line and it will open up the sublime window.

$ sublime3

Step 5. Create Gnome desktop launcher You can run Sublime3 on desktop by clicking a icon.

$ sudo sublime3 /usr/share/applications/sublime3.desktop

Step 6. Append this and close file.

[Desktop Entry]
Name=Sublime3
Exec=sublime3
Terminal=false
Icon=/opt/sublime_text_3/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

Now, you can see the Sublime3 icon on under Applications → Programming.
You can run Sublime3 on desktop by clicking this icon. Enjoy!!

Solution 2

To install sublime on CentOS, RHEL and older version of Fedora, run the following commands-

sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg

sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo

sudo yum install sublime-text

Sublime is Installed

# Check the version of Sublime 

subl --version

Hope this works!!!

Share:
13,274
Dibya Sahoo
Author by

Dibya Sahoo

An experienced professional with a successful track record in handling a profitable business unit with specialization in Product Management and Development, currently doing everything in this domain knowledge for Pepipost to establish itself as the industry leader.

Updated on June 17, 2022

Comments

  • Dibya Sahoo
    Dibya Sahoo almost 2 years

    Sublime is really cool. Loved the slick user interface, a perfect developer environment and an amazing performance. Today I was re-installing the sublime as my OS has some problem. Thought to share the steps to install the Sublime, as this is a great tool for developers- Its really a editor which you’ll fall in love with.

  • andy shih
    andy shih over 5 years
    Thanks, this way make sence