How to Install Sublime Text on Ubuntu 24.04

Do you want to change your text or code editor on Ubuntu? Here’s Sublime for you.

Sublime editor is well known for its simplicity and lightweight nature, i.e., State of the art text as well as code editor. It has a syntax highlighting feature as well, which enhances the developer’s experience while coding. Thus, Sublime can be the best pick for Ubuntu users looking for a text and code editor in one place.

Therefore, today we will illustrate the installation methods of Sublime Text on Ubuntu 24.04.


Because of its importance, Sublime is available through multiple sources for Ubuntu. Let’s start from Sublime’s repository:

Method 1: Installing Sublime Using Sublime’s Repository | Terminal

Sublime Repository and its trusted GPG key can be added to the Ubuntu system to get the Sublime editor. Follow the steps to add the trusted GPG key and Run the following commands to install Sublime through its official repository.

Step 1: Add the Trusted GPG Key

To secure your system from unauthorized repositories, you need to add the trusted key for that specific repository via the command:

wget -qO - | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null

Step 2: Add Sublime Repository

As soon as the key is added, the system starts recognizing the authenticity of the repository and you can add the repository using the command:

echo "deb apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

Step 3: Install Sublime Editor

As the apt list is updated, you must update the core libraries (packages list) using the command:

sudo apt update

This command loads the latest available package versions from all the repositories:

Now, install Sublime Text Editor using the command:

sudo apt install sublime-text


Let’s check the version:

You can launch Sublime-Text from the terminal using the command:


Or search it inside the applications menu to launch.

Let’s proceed to the second installation method.

Method 2: Installing Sublime Using the Snap | Terminal

Snap is one of the leading package providers for Ubuntu (and other Linux distros). The packages installed from the snap store are named “snap”. Interestingly, the Snap store offers the Sublime-Text on its store.

Step 1: Install/Enable the Snap Support

Ubuntu does not have the Snap support but it can be activated by running the following commands in sequence:

sudo apt install snapd
sudo snap install core

Step 2: Install Sublime

Here’s the command to install Sublime from snap:

sudo snap install sublime-text --classic

Version 4169 installed via snap is the same as the repository’s method.

To launch the Sublime installed using the snap, you can run the following command or from the applications menu:


Note: The Snap-supported Sublime is also available through GUI. Let’s install it using Snap GUI

Method 2.1: Installing Sublime Text Using the Snap | App Centre – GUI

Snap GUI is accessible through the App Centre on Ubuntu 24.04. To install Sublime using GUI, open the Ubuntu App Centre:

Search for “Sublime”:

Proceed with the installation:

That’s a very simple and easy way to install Sublime.

Method 3: Installing Sublime Using Flatpak/Flathub | Terminal

Flatpak and Flathub are the widely used resources to get packages on Linux systems. Flathub does offer the Sublime but it is a bit older and its recent build was around 2 years ago on the flatpak. Therefore, it is recommended to either use the Snap method or Sublime’s own repository method to install Sublime on Ubuntu 24.04:

Step 1: Install/Enable Flatpak/Flathub

By default, Ubuntu 24.04 does not have the flatpak or the flathub. Thus, first, install flatpak and add the falthub remote to your system:

sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub

Step 2: Install Sublime

First, let’s check the version available on Flatpak, using the command:

flatpak search sublime

Version 3.2.2 is the latest supported by the flatpak.

Run the below command to install the latest available Sublime on the Flathub:

flatpak install flathub com.sublimetext.three

To launch the Sublime installed from flatpak, use the below command:

flatpak run com.sublimetext.three

Note: When you launch Sublime using the flatpak run command, you will get an update prompt as shown below. If you want to keep using the same version, click “Cancel”, or if you choose “Download”, you will be redirected to Sublime’s web page to get the latest version.

That’s how you can get Sublime on Ubuntu 24.04.

How to Uninstall Sublime Text From Ubuntu 24.04

Sublime removal depends upon the method followed for installation. We will provide all the above-listed methods to uninstall the Sublime from Ubuntu 24.04:

Installed Using the Sublime Repository

sudo apt autoremove sublime-text

Installed Using Snap

sudo snap remove sublime-text

Installed Using Flatpak

flatpak uninstall flathub com.sublimetext.three

That’s all about Sublime on Ubuntu 24.04.

Bottom Line

To install Sublime on Ubuntu 24.04 from the terminal, add its repository (and its key) and use the “sudo apt install sublime-text” command. You can also get Sulime using the snap command “sudo snap install sublime-text –classic”. However, if you want to install it using the GUI, then you need to use the “App Centre” of Ubuntu and get Sublime. All these methods are demonstrated in this post.