Categories
Ubuntu

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Sublime Text is a lightweight and feature-rich programming text editor available for Linux, Windows, and macOS. Sublime Text 4 is the latest version of Sublime Text at the time of this writing.

New features of Sublime Text 4:

In this article, I will show you how to install Sublime Text 4 on Ubuntu 22.04 LTS and how to upgrade and uninstall Sublime Text. So, let’s get started.

Topic Contents:

  1. Licensing Requirements of Sublime Text
  2. Installing Sublime Text 4 from the Snap Store
  3. Installing Sublime Text 4 from the Official Package Repository
  4. Upgrading Sublime Text
  5. Uninstalling Sublime Text
  6. Conclusion

Licensing Requirements of Sublime Text

Sublime Text is not free. You will need to buy a one-time license key to use Sublime Text.

At the time of this writing, you can try Sublime Text for free for as long as you want. There’s no enforced time limit for the trial version.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Installing Sublime Text 4 from the Snap Store

The easiest way to install the latest version of Sublime Text on Ubuntu 22.04 LTS is from the Snap Store.

You can search for Sublime Text on the Snap Store using the following command:

$ sudo search sublime

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The following image shows the name of the Sublime Text snap, sublime-text, and the version of the package is 4126 (the latest version at the time of this writing).

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

To install the latest version of Sublime Text from the Snap Store, run the following command:

$ sudo snap install sublime-text --classic

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The package is downloaded from the Snap Store. Wait until the download is complete.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

At this point, the latest version of Sublime Text is installed from the Snap Store.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Once Sublime Text is installed, click on the Sublime Text icon from the Application Menu of Ubuntu 22.04 LTS to open it.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Sublime Text is opened as shown in the following image:

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The following image shows Sublime Text 4126 – the latest version of Sublime Text 4 at the time of this writing:

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Installing Sublime Text 4 from the Official Package Repository

You can install the latest version of Sublime Text from the official package repository of Sublime Text.

First, download the GPG key of the Sublime Text official package repository using the following command:

$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo tee /etc/apt/trusted.gpg.d/sublimehq-pub.asc

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The GPG key of the official Sublime Text package repository should be downloaded and installed.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Now, update the APT package repository cache using the following command:

$ sudo apt update

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Install the apt-transport-https package with the following command:

$ sudo apt-get install apt-transport-https -y

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The following image shows the package’s installation process:

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Add the official package repository of Sublime Text on Ubuntu 22.04 LTS using the following command:

$ echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Update the APT package repository cache with the following command:

$ sudo apt update

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

To install the latest version of Sublime Text from its official package repository, run the following command:

$ sudo apt install sublime-text -y

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The latest version of Sublime Text is now being downloaded from the official package repository of Sublime Text. Wait until the download is complete.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Once Sublime Text is downloaded, it will take a few seconds to install.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

At this point, the latest version of Sublime Text is installed.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Once Sublime Text is installed, click on the Sublime Text icon from the Application Menu of Ubuntu 22.04 LTS to open it.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Sublime Text is opened as shown in the image below:

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

The following image appears the use of Sublime Text 4126 – the latest version of Sublime Text 4 at the time of this writing.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Upgrading Sublime Text

If you installed Sublime Text from the Snap Store of Ubuntu 22.04 LTS, you could upgrade Sublime Text using the following command:

$ sudo snap refresh sublime-text

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Any available update will appear and is subject to installation. In the following example, no update is available.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

If you installed Sublime Text from the official package repository of Sublime Text, you can upgrade Sublime Text using the following command:

$ sudo apt install sublime-text

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Any available update will appear and is subject to installation. In the example provided below, no update is available:

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Uninstalling Sublime Text

If you installed Sublime Text from the Snap Store of Ubuntu 22.04 LTS, you can uninstall it using the following command:

$ sudo snap remove sublime-text

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

At this point, Sublime Text is uninstalled.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

If you installed Sublime Text from the official package repository of Sublime Text, you can uninstall it using the following command:

$ sudo apt remove sublime-text

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

To confirm the action, press Y and then press <Enter>.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

At this point, Sublime Text is successfully uninstalled.

How to Install Sublime Text 4 in Ubuntu 22.04 LTS

Conclusion

This article demonstrates how to install the latest version of Sublime Text in Ubuntu 22.04 LTS from the Ubuntu 22.04 LTS Snap Store and Sublime Text’s official package repository. The process on how to upgrade and uninstall Sublime Text is also included. Check other Linux Hint articles for more tutorials.

Leave a Reply

Your email address will not be published. Required fields are marked *