Install Sublime Text on Ubuntu 22.04 Latest Version Quickly

0

The Sublime Text editor is the first preferred text editor for any programmer till 2022 and will continue its legacy. It has many features that attract many programmers such as “Go to anything”, “Quick navigation to files”, “Multiple lines select”, “ Jump to Cursor” and many more features. In this article, you will learn how to install Sublime Text on Ubuntu 22.04

How to install Sublime Text on Ubuntu 22

Sublime can be installed in multiple ways, depending upon user flexibility, some prefer Ubuntu Software Center(GUI Method), and some prefer CLI Method. We will discuss both methods here. Let’s start with GUI(Graphical User Interface) method.

Install Sublime Text Editor from Ubuntu Software Center via Snap Package Manager

First, Open Ubuntu Software Center, and search for Sublime text

Install Sublime Text on Ubuntu 22.04

Now click on the “Install” button to install sublime text on Ubuntu 22.04.

install sublime text on Ubuntu 22.04

When you click on install, it will ask for the system password, which is your computer login password. Insert password and wait for the installation completion.

install sublime text on Ubuntu 22.04

When the installation is completed, check sublime text installation by using the ubuntu application launch window by typing “Sublime”. If your installation is done successfully will see the software on the ubuntu application launcher.

Awesome, the Sublime text installation is done successfully on your Ubuntu 22.04 system.

Install Sublime Text on Ubuntu 22.04 using Command Line

If you are comfortable with CLI or Ubuntu terminal, you can install Sublime text on Ubuntu via terminal with a couple of Linux commands. To install Sublime Text using the command line, first, update your Ubuntu package manager by running the below command and followed by the second command to install using single installation command from the snap maintained package manager.

$ sudo apt update
$ sudo snap install sublime-text --classic

When you run the installation command, it will ask for the password. Insert your system password to continue the installation.

Alternatively, you can install Sublime Text using Ubuntu’s official Apt repository. The official “.deb” packages work in different Linux distributions including “Linux Mint”, “Debian”, and some other Linux distributions.

To install from Ubuntu’s Apt repository, first, make sure your “HTTPS” source is supported or not, if not supported, run the below command to enable.

$ sudo apt-get install apt-transport-https

Now, add the repository key by running the following command.

$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq-pub.gpg

Now, it will download the key from Sublime official website and converted it to an encrypted key, and saved it into a keyring (/usr/share/keyring) directory.

Install Sublime Text on Ubuntu 22.04

Now, we need to add the official repository. To do so, run the following command to create a source file via “VI text editor”.

$ sudo vi /etc/apt/sources.list.d/sublime-text.list

It will open a file, now add the following line on the file by pressing the “i” key on the keyboard and save it by pressing “ESC + : + wq”.

$ deb [signed-by=/usr/share/keyrings/sublimehq-pub.gpg] https://download.sublimetext.com/ apt/stable/

After saving the file, update the repository again and then install Sublime Text by following commands.

$ sudo apt update
$ sudo apt install sublime-text

Sublime Text Editor Install using Flatpak Packages

The latest version of Sublime Text editor is not available on Flatpak so far. But you can download the old version from Flatpak as of now.

If Flatpak is already installed on your system then you can install Sublime text on Ubuntu 22.04 directly. If Flatpak is not installed, then you can install Flatpak by following and then following by sublime text installation command.

$ sudo apt install flatpak
$ flatpak install https://dl.flathub.org/repo/appstream/com.sublimetext.three.flatpakref

Read More: How to Install Vim on Ubuntu Easily [3 steps]

Uninstall Sublime Text from Ubuntu 22.04

You can remove or uninstall Sublime Text from Ubuntu 22.04 by using Ubuntu Software Center or by running commands. To uninstall Sublime Text from Ubuntu, run following command.

$ sudo snap remove --purge sublime-text

If you installed Sublime Text using Flatpak package, use the below mentioned command to uninstall the software.

$ flatpak uninstall --delete-data com.sublimetext.three

and cleanup useless run-times via

$ flatpak uninstall --unused

For the official .deb package, remove it by running the following command:

$ sudo apt remove --autoremove sublime-text

Conclusion

In this tutorial, you have learnt how to install Sublime Text on Ubuntu 22.04. If you have any doubts or any questions, feel free to drop a comment below, I will try to answers.

LEAVE A REPLY

Please enter your comment!
Please enter your name here