A new Ubuntu setup often calls for a desktop editor for source files. Sublime Text is a cross-platform text editor that you can install and update through Ubuntu’s package manager.
You’ll learn to add Sublime HQ’s stable APT source and launch the editor after installation.
TL;DR
Install the stable Sublime Text package on Ubuntu from Sublime HQ’s signed APT repository, then launch it from Applications or the terminal.
- Add the vendor’s signing key to /etc/apt/keyrings.
- Register the stable channel with a deb822 source file.
- Refresh APT and install the sublime-text package.
What Is Sublime Text?
Sublime Text is a cross-platform text editor for source files, project folders and plain text. On Ubuntu, the official APT repository supplies it as a package that APT can install and update.
APT is Ubuntu’s package manager. A repository is a server that provides packages and signed metadata. A signing key lets APT verify the repository’s metadata, while the source entry identifies the server and channel.
How to Install Sublime Text on Ubuntu with APT
Use the stable channel unless you have a Sublime Text license and specifically need development builds. The official instructions cover Ubuntu’s APT workflow and support x86-64 and arm64 packages. The commands below change system package configuration, so run them on your Ubuntu machine with an administrator password available.
Step 1: Add Sublime HQ’s signing key
APT stores repository keys in a keyring. Save Sublime HQ’s public key under /etc/apt/keyrings so the source entry can refer to that key specifically instead of trusting it for every repository.
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo tee /etc/apt/keyrings/sublimehq-pub.asc > /dev/null
This command downloads the public key and writes it to the path used in the next step. The sudo prompt authorizes the write to a system directory.
Step 2: Add the stable APT source
Create a deb822 source file that names the repository, stable channel and keyring. Its Signed-By field tells APT which key authenticates this source.
echo -e 'Types: deb\nURIs: https://download.sublimetext.com/\nSuites: apt/stable/\nSigned-By: /etc/apt/keyrings/sublimehq-pub.asc' | sudo tee /etc/apt/sources.list.d/sublime-text.sources
The file uses the .sources format. Its URI points to Sublime HQ, its suite selects stable, and Signed-By names the key path from Step 1.
Step 3: Refresh APT and install Sublime Text
APT must refresh its package index after the new source is added. Then install the package named sublime-text.
sudo apt-get update
sudo apt-get install sublime-text
The first command retrieves package metadata from configured sources. The second installs Sublime Text and any required dependencies. APT may ask you to confirm the package changes before it proceeds.
Step 4: Open the editor
After APT finishes, search for Sublime Text in Ubuntu’s Applications view. You can also launch it from a terminal with the command below.
subl
The editor window should open. To open a project directory from the terminal, pass its path to the launcher, such as subl ~/Projects/my-app. Use an existing directory path on your machine.
Check the Installation and Handle Common Issues
If the application opens and appears in the Applications list, the package is installed and launchable. When APT cannot find the package or the launcher is missing, check the repository configuration before repeating the install.
| Symptom | What to check | Next action |
|---|---|---|
| Unable to locate package sublime-text | The source file exists at /etc/apt/sources.list.d/sublime-text.sources | Run sudo apt-get update, then retry installation |
| APT reports a key or signature problem | Signed-By path matches /etc/apt/keyrings/sublimehq-pub.asc | Recheck the key download and source entry |
| Package isn’t shown in the launcher | APT finished without an installation error | Try launching with subl from a terminal |
| Device uses ARM | Ubuntu architecture is arm64 | Use the official APT repository, which lists arm64 packages |
Use the vendor’s stable source instead of old instructions that rely on apt-key or a historical Sublime Text 2 or 3 package. The current repository documentation identifies the stable and dev channels separately. Dev builds are limited to licensed users.
To update the package later, refresh the index and install available upgrades through APT. To remove the editor while keeping its repository configuration, use the package-removal command. Remove the source and keyring separately only if you no longer want Sublime HQ as an APT source.
sudo apt-get update
sudo apt-get install --only-upgrade sublime-text
sudo apt remove sublime-text
Conclusion: Use the Official Stable Repository
The official stable APT repository gives Ubuntu a package-managed Sublime Text installation. APT handles later package updates.
For related Ubuntu package tasks, see the LinuxForDevices guides to the apt command and Ubuntu package manager. The cd command guide covers changing directories before running a command in a project folder.
FAQ
These answers cover the common choices around this Ubuntu installation.
Which Sublime Text channel should I install?
Choose the stable channel for routine use or evaluation. Sublime Text documents dev-channel builds as available to licensed users.
How do I update Sublime Text on Ubuntu?
Use APT’s routine package update process, then install the available sublime-text upgrade.
Can I install Sublime Text on Ubuntu ARM?
The official Sublime Text APT repository lists packages for x86-64 and arm64.
