Commands to install Sublime Text editors on Ubuntu 22.04 Jammy JellyFish or Ubuntu 20.04 Focal Fossa using Terminal. Version 3 of Sublime is a sensible further development that comes up with numerous features.
In addition to classic functions such as syntax highlighting for countless programming and scripting languages, snippets, and a code preview, “Sublime Text” has some special features that make the editor interesting for ambitious users. For example, the search and replace function also accepts regular expressions. Selections can be applied specifically to the same words, for example, to quickly adjust a class in the entire document; text blocks can also be edited quickly with a so-called batch selection.
Coded in C++ and python, Sublime Text puts emphasis on the use of keyboard shortcuts, hence the user can use shortcuts to open and switch documents. Users can also activate the distraction-free mode and edit the text on full screen.
Steps to install Sublime Text 4 on Ubuntu 22.04 | 20.04 LTS
The steps given here to set up Sublime Text will be similar for other Linux based on Debian and Ubuntu such as MX Linux, Elementary OS, POP_OS, and more as well.
#1st way to install using APT
• Ubuntu Linux
• A non-root user with sudo rights
• Terminal access
• Active internet connection
2. Update Ubuntu 22.04 | 20.04 Linux
Before going for the installation command, let’s run the system update. This will make sure all the packages of the system are in their latest stable state.
sudo apt update && sudo apt upgrade
3. Add GPG key
Linux system requires a GPG key that helps it to authenticate the packages we are about to install using the package repository of Sublime.
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
4. Add Sublime Text editor repository
Well, the packages to install Sublime Text editor are not available through the system repository of Ubuntu using the APT package manager. Hence, we have to add the one officially provided by the developers of Sublime. Here are the commands to follow.
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Run system update:
Update the repository cache:
sudo apt update -y
5. Install Sublime Text 4 on Ubuntu 22.04 | 20.04
We already have configured the package source for this software to download. Now, let’s use the APT package manager to install Sublime text.
sudo apt install sublime-text
6. Launch your text editor
Once the installation is completed, go to all application launchers and search for the Sublime editor.
7. Uninstall Sublime Text 4
Well, if you don’t want this text editor program on your system anymore then we can remove the same using the command terminal.
sudo apt remove sublime-text
#2nd way to install using SNAP
8. Use SNAP to install Sublime
Well, those who don’t want to use the repository method can go for Snap. In Ubuntu Snap has been enabled by default, hence executing a single will install this text editor on your Ubuntu 22.04 or 20.04 LTS.
sudo snap install sublime-text --classic
To remove (optional):
sudo snap remove sublime-text --classic