Sublime Text 3 (ST3) is a code editor known for its speed, ease of use, cross-platform and community contribution and support. The application can also be customized and enhanced by installing additional features using package control and custom settings.
You will know how to install Sublime Text 3 on your Ubuntu 20.04 LTS Focal Fossa operating system in the following guide. The same principle will work for the newer version Ubuntu 21.04 (Hirsute Hippo).
Table of Contents
- Recommended OS: Ubuntu 20.04 – optional (Ubuntu 21.04 and Linux Mint 20)
- User account: A user account with sudo or root access.
Before you begin, make sure your Ubuntu 20.04 LTS Focal Fossa system is up to date:
sudo apt update && sudo apt upgrade -y
Next, install the dependencies required to download a new repository over HTTPS protocol:
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common curl -y
Download & Install
You will need to import the GPG key to add the repository successfully. Enter the following command:
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo add-apt-repository "deb https://download.sublimetext.com/ apt/stable/"
You should get the following output “Ok“. Once complete, update and download Sublime Text 3 by typing:
sudo apt install sublime-text
Note, you can also use Snap packages for installing sublime text editor. The snap install command can do this:
sudo snap install sublime-text
The recommended installation is usually the direct approach using the repository from the sublime text over snaps. Snaps also take up a larger footprint on your hard drive. However, for convenience, snaps can be easier to maintain and install.
Launch Sublime Text 3
Great, so you have installed the software package, now it’s time to launch the application. This can be done in a few different ways. The most common is Activities -> Sublime from your Ubuntu desktop or the below:
Start Sublime Text 3 by terminal:
Start Sublime Text 3 by Application Menu:
The first time you launch Sublime Text, you should see the following window. Ignore the unregistered part unless you are planning on using the software for commercial/enterprise use.
Uninstalling the Sublime Text Editor
If you no longer require sublime text, you can remove it from your operating system as follows:
Remove apt install:
sudo apt autoremove sublime-text
Remove snap install:
sudo snap remove sublime-text
Note, you can also remove Sublime Text apt by accessing the System Settings -> Software & Updates -> Other Software tab.
Comments and Conclusion
You have learned how to install Sublime Text 3 on your Ubuntu 20.04 LTS Focal Fossa operating system by learning how to add the source repository and the additional feature of a snap install. Now, you can visit the Sublime Text Package Control, which you can now download additional features to customize your Sublime Text editor to your requirements.
To find more information about Sublime Text, visit the official Sublime Text documentation page.