Sublime Text used to be one of the most popular cross-platform proprietary-based text and source code editors back in the day, alongside Atom Editor (now discontinued).

Regrettably, today it's overshadowed by other popular IDEs like VScode, yet there remains a huge userbase that prefers Sublime Text over alternatives, offering a versatile platform for coding in various programming and markup languages.

In this article, I'll demonstrate the installation of Sublime Text on Ubuntu and other Linux distributions like Linux Mint, Fedora, Rocky Linux, openSUSE, Arch, and Manjaro using various methods.

Install Sublime Text in Linux Using Package Manager

You can install Sublime Text using the default package manager, which involves a few additional steps like adding the GPG key, APT repository, and the installation command.

While this method might pose some inconvenience for beginners, once completed, you can effortlessly handle the installation, removal, and updates of Sublime Text directly from your package manager.

If you're not comfortable with this approach, you can opt for the next Snap method; otherwise, you can open your terminal and execute the corresponding commands according to your Linux distribution to install Subtime Text Stable x86_64 version.

Install Sublime Text in Debian and Ubuntu-based Distros

$ wget -qO - | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null
$ echo "deb apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
$ sudo apt update
$ sudo apt install apt-transport-https
$ sudo apt install sublime-text

Install Sublime Text in RHEL and Fedora-based Distros

$ sudo rpm -v --import
$ sudo dnf config-manager --add-repo
$ sudo dnf install sublime-text

Install Sublime Text in Arch and Manjaro-based Distros

$ curl -O && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
$ echo -e "\n[sublime-text]\nServer =" | sudo tee -a /etc/pacman.conf
$ sudo pacman -Syu sublime-text

Install Sublime Text in OpenSUSE

$ sudo rpm -v --import
$ sudo zypper addrepo -g -f
$ sudo zypper install sublime-text

Install Sublime Text in Linux Using Snap

Snap is the universal package manager that comes preinstalled in Ubuntu but can be easily installed on any other Linux distribution, such as Linux Mint, Fedora, Rocky Linux, openSUSE, Arch, and Manjaro.

So, if you already have Snap on your system, run the following command to install Sublime Text:

$ sudo snap install sublime-text --classic

If you're interested in installing Sublime Text candidate, edge, or dev version, make sure to visit its Snap page for the corresponding installation command.

Install Sublime Text in Linux Using Flatpak

Much like Snap, Flatpak is a widely-used universal package manager preinstalled in Fedora but easily installable on most Linux distributions. Unfortunately, as of the time of writing this article, the Sublime Text Flatpak package on the Flathub repository hasn't been updated for several years.

So, I wouldn't suggest installing it from Flatpak; instead, follow one of the previous methods. But if you persist, then execute the following command to start the installation.

$ flatpak install flathub com.sublimetext.three

Install Sublime Text in Linux via DEB/RPM File

This method is a bit more inconvenient than the previously mentioned methods, but it will make sure you always have the latest version of Sublime Text on your Linux system.

To install Sublime Text using the .deb or .rpm package, start by visiting the official Sublime Text download page, then click on the "direct downloads" link, and finally select your desired Sublime Text package according to your distribution.

download sublime distribution package

It will redirect you to a new page, where the download will begin immediately. Open your terminal, navigate to the download directory, and execute one of the following commands based on your Linux distribution to begin the installation.

  • On Debian, Ubuntu, Linux Mint, Zorin OS, Pop!_OS, etc.
  • sudo dpkg -i sublime-text*.deb
  • On RHEL, Fedora, CentOS, Rocky Linux, AlmaLinux, etc.
  • sudo rpm -i sublime-text*.deb

How to Use Sublime Text on Linux

Once the installation is finished, you can find and launch Sublime Text from the application menu, and upon launching, you will interact with the following window.

opening sublime text

Most things are quite similar to other editors, so what I want to emphasize is the management of plugins (also referred to as packages) in Sublime Text. Here, "Package Control" serves as a package manager for Sublime Text, allowing you to find, install, and update packages directly within the application.

So, let’s begin by installing "Package Control" via the "Tools" menu, followed by selecting "Install Package Control".

installing package control in sublime text

Once the installation is finished, you'll receive a notification. To install a plugin for that purpose, start by opening "Preferences" and clicking on "Package Control".

opening the package control in sublime text

It will list all the available "Package Control" options, such as installing packages, listing installed packages, enabling packages, uninstalling packages, and more.

package control options in sublime text

To install a new package, click on "Install Package", which will open another window displaying the list of all available packages. Here, you can type your desired package name (for example, Git); once you find it in the results, click on it to start the installation in the background.

installing package in sublime text

Once the installation is complete, head to "Preferences" -> "Package Settings" to check all the installed packages and manage their settings.

check installed packages in sublime text

That's it! In the future, if you need to disable or remove the package, simply go to "Preferences" -> "Package Control" and then click on "Disable package" or "Remove package" according to your needs.

How to Remove Sublime Text from Linux

To remove Sublime Text from your Linux system, installed via the package manager or .deb or .rpm package, open your terminal and execute the appropriate command according to your Linux distribution.

  • On Debian, Ubuntu, Linux Mint, Zorin OS, Pop!_OS, etc.
  • sudo apt remove sublime-text
  • On RHEL, Fedora, CentOS, Rocky Linux, AlmaLinux, etc.
  • sudo dnf remove sublime-text
  • On Arch, Manjaro, Black Arch, Garuda, etc.
  • sudo pacman -Rs sublime-text
  • On OpenSUSE
  • sudo zypper remove sublime-text

If it is installed via Snap or Flatpak, then run:

  • via Snap
  • sudo snap remove sublime-text
  • via Flatpak
  • flatpak uninstall com.sublimetext.three

That's it. This way, you can easily install Sublime Text using various methods and then manage the packages within the same application.