install sublime text on ubuntu linux

In this post we show you how to install Sublime Text 4 on Ubuntu, Linux Mint, and other Ubuntu-based Linux distros the recommended way.

Sublime Text is a popular cross-platform text editor with a big following among web and software developers. But while Sublime Text is available for Linux distros like Ubuntu (as well as Windows and macOS) it’s not available to install directly from the Ubuntu repos.

Instead, you need to add the official Sublime Text repository to your system and install the editor from it. The Sublime Text repo supports Ubuntu 18.04 LTS and up, so chances are it’ll work on your system!

Let’s get in to it!

Installing Sublime Text From a Repo

Sublime Text 4 on Ubuntu 20.04 LTS

Sublime Text is a proprietary text editor available for use on all major operating systems, including Linux-based ones like Ubuntu.

As editor’s go, Sublime is fast and responsive — faster than the Atom text editor, anyhow — and it boasts an expansive feature set that can be extended further using plugins. Heck, an entire ecosystem of Sublime Text plugins are available out there (just be aware some may not work with the latest Sublime Text release due to its migration to Python 3.8).

All great, so what there’s a “catch” to using Sublime Text.

Although you can download the Sublime Text and use it for free you’re supposed to buy a license to use it full-time. Licenses start at $80. However, the editor’s ‘evaluation’ period doesn’t actually expire. This means you can, in theory, use Sublime Text for as long as you like, gratis!

You can download Sublime Text for Windows, macOS and Linux direct from the editor’s website, however this route has one big drawback on Ubuntu: no automatic updates to new versions when released.

If you want to install Sublime Text 4 on Ubuntu and get automatic updates to new releases you will need to add the official Sublime Text repository (aka repo) to Ubuntu’s list of software sources.

Step 1: Download the security key for the Sublime text editor repository. This step is important as it ensures any packages you download from the linked repo are what they say they are, with no nasty surprises:

wget -qO - | sudo apt-key add -

Step 2: Add the Sublime Text stable repository:

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

If you want to run a development build of Sublime Text instead of the stable version you can run this command instead of the one above — though dev version DO require a valid license to use:

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

Step 3: Install Sublime Text:

sudo apt update && sudo apt install sublime-text

That’s all you need to do!

After the install is complete you can go ahead and open Sublime Text from your desktop app launcher of choice.

Apps How To code editors sublime text texteditor