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.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our CUstomers to perform CentOS related packages installation tasks.
In this context, we shall look into how to install a sublime text editor through the command line for the desktop CentOS 8 environment.
How to install Sublime Text Editor through Command-line on CentOS ?
Ensure that you carry out this task as the root user with sudo privileges.
Then, follow the steps given below to install the Sublime text editor.
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
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
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
To get 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.
4. How to 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:
This will display Sublime text editor window on your desktop.
Alternatively, You can also access the sublime window through the graphical interface.
To do this:
i. Click on the 'Activities' and from there, type the 'Sublime' in the search bar.
ii. The sublime application icon will show in the result.
iii. Click on the Sublime editor icon to launch this application.
How to 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
Finally, Press 'y' in order to complete the removal process.