Install Sublime Text on Ubuntu 22.04

Install Sublime Text on Ubuntu 22.04

Sublime Text is a popular text editor loved by developers for its speed, simplicity, and powerful features. This editor supports a wide range of programming languages and markup formats. Sublime Text is a cross-platform application, offering compatibility with a range of operating systems such as Windows, Linux, and Mac.

This tutorial shows how to install Sublime Text on Ubuntu 22.04.

Install Sublime Text

Download the GPG key for the Sublime Text repository:

sudo wget -qO /etc/apt/trusted.gpg.d/sublime-text.asc https://download.sublimetext.com/sublimehq-pub.gpg

Once you've downloaded the GPG key, you'll need to add the Sublime Text repository to the system's sources list:

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

Update the package lists to ensure that Ubuntu knows about the packages available in the new repository:

sudo apt update

Finally, install Sublime Text:

sudo apt install -y sublime-text

Testing Sublime Text

Once the installation is complete, you can launch Sublime Text from the application menu or by running the following command in the terminal:

subl

Uninstall Sublime Text

If you want to completely remove Sublime Text, execute the following command:

sudo apt purge --autoremove -y sublime-text

Remove GPG key and repository:

sudo rm -rf /etc/apt/trusted.gpg.d/sublime-text.asc
sudo rm -rf /etc/apt/sources.list.d/sublime-text.list

If you wish to erase all user data associated with Sublime Text, you can delete the Sublime Text configuration directory:

rm -rf ~/.config/sublime-text

Leave a Comment

Cancel reply

Your email address will not be published.