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:

  • GPU rendering for fluid UI.a
  • 8K resolution support
  • Refreshed UI
  • Light and dark mode support
  • Available for ARM64 CPU architectures
  • TypeScript, JSX, and TSX support
  • New auto-completion engine for content-aware auto-completion
  • Improved syntax definitions
  • Updated Sublime Text Python API

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.

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

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).

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

$ sudo snap install sublime-text --classic

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

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

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

Sublime Text is opened as shown in the following image:

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

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

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

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

$ sudo apt update

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

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

The following image shows the package’s installation process:

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

Update the APT package repository cache with the following command:

$ sudo apt update

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

$ sudo apt install sublime-text -y

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

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

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

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

Sublime Text is opened as shown in the image below:

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

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

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

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

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

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

At this point, Sublime Text is uninstalled.

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

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

At this point, Sublime Text is successfully uninstalled.

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.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.