This article is going to take you through on how to Install Sublime Text on Ubuntu 22.04. Sublime Text is a source code editor that is available for purchase. It comes with built-in support for a variety of programming and markup languages. Plugins, which are often community-built and maintained under free-software licenses, allow users to extend the functionality of the text editor.
How to Install Sublime Text on Ubuntu 22.04
We are going to Install Sublime Text using three methods;
Install Sublime Text on Ubuntu 22.04 via Snap GUI
- Open Ubuntu software center.
- Search for Sublime text on the search bar and click it to open.
- Next click install button to install sublime text on your system.
- When installation percentage reaches 100% sublime text would have been installed on your system. Launch Sublime Text from the application menu by searching it.
- When launched, you can start coding or open existing project from the File menu then open folder or from the Project tab.
- Sublime Text allows you to work on several tabs, to open new click on the top right + sign.
- To buy license click on Help then Purchase License on the drop menu that will appear.
Uninstall Sublime Text via GUI on Ubuntu 22.04
- Repeat the installation process, you will get Remove button instead of Install. Click it to uninstall.
Install Sublime Text on Ubuntu 22.04 via Snap Terminal
- Run the following command to Install Sublime Text via snap.
sudo snap install sublime-text --classic
- Sublime Text can be launched from the application menu or my running the following command.
Uninstall Sublime Text via snap
- Run the command below to remove Sublime Text via snap.
sudo snap remove sublime-text
Install Sublime Text on Ubuntu 22.04 via APT Repository
- Start by adding Sublime Text GPG Key using the command below.
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
- Next add Sublime Text repo using the following command.
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
- Then update your system for changes to take effect.
sudo apt update
- After updating your system, install Sublime text using the command below.
sudo apt install sublime-text
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: sublime-text 0 upgraded, 1 newly installed, 0 to remove and 0 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 13s (1,306 kB/s) Selecting previously unselected package sublime-text. (Reading database ... 231282 files and directories cur rently installed.) Preparing to unpack .../sublime-text_4126_amd64.deb .. . Unpacking sublime-text (4126) ... Setting up sublime-text (4126) ... Processing triggers for desktop-file-utils (0.24-1ubun tu3) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) .. . Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Uninstall Sublime Text on Ubuntu 22.04
- To completely remove Sublime Text on your system run the following commands in there respective order.
sudo apt autoremove sublime-text sudo rm /etc/apt/sources.list.d/sublime-text.list sudo rm /usr/share/keyrings/sublimehq.gpg
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: sublime-text 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 50.6 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 231382 files and directories cur rently installed.) Removing sublime-text (4126) ... dpkg: warning: while removing sublime-text, directory '/opt' not empty so not removed Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) .. . Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubun tu3) ...
- You have reached the end of the article, Congratulations. You have learned how to Install sublime text on Ubuntu 22.04.
Read more on Sublime Text Documentation