CentOS

How to Install Sublime Text Editor on CentOS 8

Install Sublime Text Editor on CentOS 8

The Sublime Text Editor is a well-known, lightweight, cross-platform source code and text editor that has a friendly working interface. It has various built-in multifunctional Vim mode features. The sublime editor supports various plugins, programming languages, snippets, APIs, and other markup languages like Html, PHP, C, Java, C#, asp, Latex. You can install new plugins to extend its functionality. It has built-in different python based API’s that are available in Windows, Linux, and Mac OS.

This article will demonstrate how you can install a sublime text editor through the command line for the desktop CentOS 8 environment. All commands are implemented on CentOS 8 distribution that you can also run on the fedora and older versions of CentOS distributions.

Prerequisites

All commands should run under administrative privileges.

Installation of Sublime Text Editor through Command-line

The following steps you have to perform on your CentOS machine in order to install the Sublime text editor:

Step 1: Import sublime text repository’s GPG key

Open the terminal application from the sidebar of the Desktop and type ‘su’ command to login as administrator. Enter the password of the administrative user. Now, you don’t need to use ‘sudo’  at the start of each command. It allows you to run any administrative command for the installation of new applications. Run the following command to import the official sublime text repository’s GPG key:

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

Step 2: Include Yum repository

Now, execute the following command in order to add the Yum repository to your CentOS 8 system:

# wget -P /etc/yum.repos.d/ https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo

The following output shows on the terminal window after running the above command:

Step 3: Install Sublime Text Editor

Once the repository is added and enabled, execute the following command in order to install the Sublime Text Editor on CentOS 8 system:

# dnf install sublime-text

For the new version of CentOS distribution, you need to follow the ‘dnf’ command. The confirmation options in terms of (Y/N) to be displayed on the terminal. Press ‘y’ in order to confirm and proceed with the installation of the Sublime Text editor.

In a while, the installation will complete on your system that means Sublime Text Editor is now installed on your system.

Note: A Sublime editor is proprietary software. By following the above method, you can download it free for personal use. But, if you need this editor for long-term use then, you are required to purchase the license of this software to run it on your system.

Step 4: Launch Sublime Text on CentOS 8

You can launch or access the Sublime Editor interface through the command line by using the below-given command:

# subl

The following window of Sublime text editor will show on your desktop:

You can also access the above sublime window through the graphical interface. Click on the ‘Activities’ and from there, type the ‘Sublime’ in the search bar. The following sublime application icon shows in the result. Click on the Sublime editor icon to launch this application.

Uninstall or Remove Sublime Text Editor from CentOS 8

If you feel you don’t need this application then, you can easily uninstall the Sublime Text Editor on your CentOS 8 system in order to free up more space.  Use the following command to uninstall or remove the Sublime text editor from the CentOS machine:

# dnf remove sublime-text

Press ‘y’ in order to complete the removal process.

Conclusion

We have discovered the installation method of sublime text editor on the CentOS 8 system through the terminal. In this article, you learned how to launch a sublime editor by using GUI and command line. I’m sure this article will help you in the installation of a Sublime editor. Using the internet sources, you can install the Sublime editor required packages and customize this application based on your needs.

Similar Posts