Firstly, update system packages by typing sudo apt-get update
command and download the deb package for sublime using wget
with curl
, And then install latest sublime 4 text by typing sudo apt install sublime-text
command on command line or terminal window on ubuntu 22.04.
Sublime is an open-source free text editor with many features and is available on various operating systems like Windows, Mac, Ubuntu, etc.
How to Install Sublime 4 Text on Ubuntu 22.04
Here are steps to install Sublime Text 4 on ubuntu 22.04 system using terminal or command line:
Step 1 – Ubuntu Update System Packages
Press ctrl+alt+t to start terminal window and type the sudo apt update
to update Apt package list on ubuntu system:
sudo apt update
Step 2 – Setup Apt to work with https sources
To setup apt to work with https sources for downloading sublime, Use the following command on terminal window and press enter:
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common
Step 3 – Download Sublime and Install the GPG key
To download Sublime and install the GPT key, use the following command on a terminal window and press Enter:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Step 4 – Install Sublime 4 Text Ubuntu
To run the sudo apt install sublime-text command on ubuntu command line to install latest sublime text 4:
sudo apt update sudo apt install sublime-text
Conclusion
In this tutorial, you have learned how to install sublime text editor in the ubuntu system using the terminal.