In this tutorial, we are going to learn how to install the Sublime Text 4 code editor on Ubuntu 22.04.
A sublime Text editor is a shareware cross-platform source code editor, it supports almost all the programming languages.
What’s new with Sublime Text 4?
Sublime Text 4 comes with new features such as:
- GPU rendering. It can now utilize GPU on Linux, Mac, and windows giving fluid UI up to 8K resolutions.
- Tab multi-select. File tabs have been enhanced to make split-view effortless with support throughout the interface and built-in commands.
- Context-aware auto-complete. It has been rewritten to provide smart completion based on existing code.
- Updated Python API. It has updated Python to 3.8 while keeping backward compatibility.
- Superpowered syntax definition. It has improved the syntax highlighting engine a lot e.g inclusion of lazy embeds and syntax inheritance.
- Typescript, JSX, and TSX support. You are now in a position to utilize all the smart syntax-based features of sublime Text.
Install Sublime Text 4 on Ubuntu 22.04
1. Update system repositories
Before we can begin the installation of Sublime Text 4 on Ubuntu 22.04, we need to update our system repositories in order to make them up to date.
sudo apt update && apt upgrade -y
2. Install Sublime Text 4 dependencies
Sublime Text 4 requires dependencies in order to run effectively such as HTTPs, so we are required to install this if not already installed on your system.
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common
3. Install Sublime Text 4 on Ubuntu 22.04
To begin installing Sublime Text, start by installing GPG keys on your system.
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg
When you have successfully added the GPG key add Sublime Text to the apt repository with the following command.
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Then the next thing is to update the repositories for the changes to take effect and then run the installation afterward.
$ sudo apt update
$ sudo apt install sublime-text
You should be in a position to see the following output
#output
The following NEW packages will be installed:
sublime-text
0 upgraded, 1 newly installed, 0 to remove and 184 not upgraded.
Need to get 16.4 MB of archives.
After this operation, 50.6 MB of additional disk space will be used.
Get:1 https://download.sublimetext.com apt/stable/ sublime-text 4126 [16.4 MB]
Fetched 16.4 MB in 24s (685 kB/s)
Selecting previously unselected package sublime-text.
(Reading database ... 260078 files and directories currently installed.)
Preparing to unpack .../sublime-text_4126_amd64.deb ...
Unpacking sublime-text (4126) ...
Setting up sublime-text (4126) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
And you have successfully installed Sublime Text on your ubuntu 22.04.
4. Start using Sublime Text
To start using Sublime Text, you can open via the terminal or via the activities in the applications section.
Open Sublime Text on the terminal
$ subl
Open via the activities menu.
show applications >> Search for sublime >> Click on sublime icon
To start using Sublime you can import your existing project or you can create a new project.
To check the version of Sublime Text go to help then about, you will find your number there.
help >> about sublime text
The build number is your current version (Build 4126)
Conclusion
Congratulations, you have successfully installed the Sublime Text 4 editor on Ubuntu 22.04. For more information, you can head over to Sublime Text documentation.