install sublime text on ubuntu linux

In this tutorial 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 from the Ubuntu repos.

The good news is that it only takes a few minutes to add the official Sublime Text repository to your system and install the editor from it. Better yet, the repo supports Ubuntu 18.04 LTS and up — so chances are it’ll work on your system!

What is Sublime Text?

Sublime Text 4 on Ubuntu 20.04 LTS

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

It’s fast and responsive — faster than the Atom text editor, anyhow — and has an expansive feature set that can be extended further using plugins. There’s an entire ecosystem of Sublime Text plugins out there, though some may not work with the very latest version of the editor due to its migration to using Python 3.8.

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

See, 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!

Installing Sublime Text on Ubuntu

sublime text 3 application icon on Linux

You can download Sublime Text for Windows, macOS and Linux direct from the editor’s website, however this route has a major drawback on Linux distros like 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 need to add the official Sublime Text repository (repo) to Ubuntu’s list of software sources.

In the next few tips we walk through this process.

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 - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Step 2: Add the Sublime Text stable repository:

echo "deb https://download.sublimetext.com/ 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 https://download.sublimetext.com/ 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