How to Install Sublime Text 4 on Ubuntu 22.04 LTS

Sublime Text 4 is an excellent choice as your go-to program to edit code. Sublime is known for its speed, ease of use, cross-platform, and community contribution. It natively supports many programming languages and markup tongues, but users can also expand its functionality with plugins!

The Python API makes it easy; make sure you download from within Sublime, or they won’t appear in settings. Also, you can further customize and enhance it by installing additional features using package control and custom settings.

Some more features of Sublime Text include:

  • Auto-Completion.
  • Sublime Text Snippets.
  • Cursor Jumping
  • Select Multiple Lines, Words, & Columns

In the following tutorial, you will learn how to install Sublime Text 4 on Ubuntu 22.04 LTS Jammy Jellyfish using the command line terminal.

Update System

First, update your system to make sure all existing packages are up to date.

sudo apt update && sudo apt upgrade -y

Install Dependencies

To complete the installation, you will need to install the following software packages by using the following command in your terminal

sudo apt install software-properties-common apt-transport-https curl wget ca-certificates -y

Import Sublime Text 4 APT Repository

The installation is pretty straightforward; thanks to Sublime’s RPM repository, first import the GPG key as follows.

sudo wget -O- | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq.gpg

Next, you can import the stable or development repository depending on which version you wish to install.

Please note only one version can be installed at one time, do not import both repositories.

Import Sublime Text Stable

echo 'deb [signed-by=/usr/share/keyrings/sublimehq.gpg] apt/stable/' | sudo tee /etc/apt/sources.list.d/sublime-text.list

Import Sublime Text Dev

echo 'deb [signed-by=/usr/share/keyrings/sublimehq.gpg] apt/dev/' | sudo tee /etc/apt/sources.list.d/sublime-text.list

Lastly, run an APT update to reflect the new additions as follows.

sudo apt-get update

Install Sublime Text 4

With the APT repository now imported, you can begin installing using the following command.

sudo apt install sublime-text -y

Confirm the installation and, at the same time, check the installed build version of Sublime Text.

subl --version

Example output:

How to Install Sublime Text 4 on Ubuntu 22.04 LTS

Launch Sublime Text 4

With the installation complete, you can run the text editor in a few different ways.

First, while you are in your terminal, you can use the following command.


However, this isn’t practical, and you would use the following path on your desktop.

Applications > Search > Sublime Text.


How to Install Sublime Text 4 on Ubuntu 22.04 LTS

The first time you launch Sublime Text, you should see the following window. Ignore the unregistered part unless you plan to use the software for commercial/enterprise use.

How to Install Sublime Text 4 on Ubuntu 22.04 LTS

How to Remove (Uninstall) Sublime Text 4

If you no longer require sublime text, you can remove it from your system as follows:

sudo apt autoremove sublime-text -y

Lastly, remove the repository, especially if switching to the development or returning to the stable branch.

sudo rm /etc/apt/sources.list.d/sublime-text.list

For users that will not use Sublime ever again, optionally, you can remove the GPG key as follows.

sudo rm /usr/share/keyrings/sublimehq.gpg

Comments and Conclusion

You have learned how to install Sublime Text 4 on Ubuntu 22.04 LTS with stable and development installation options.

Next, it is recommended to visit the Sublime Text Package Control, where you can directly download other features to customize your Sublime Text 4 to your requirements.

To find more information about Sublime Text, visit the official Sublime Text documentation page.


Like to get automatic updates? Follow us on one of our social media accounts!