UbuntuUbuntu Based

How To Install Sublime Text on Ubuntu 24.04 LTS

Install Sublime Text on Ubuntu 24.04

In this tutorial, we will show you how to install Sublime Text on Ubuntu 24.04 LTS. Sublime Text is a widely acclaimed text editor that has gained immense popularity among developers and programmers worldwide. Its sleek interface, powerful features, and exceptional performance make it an ideal choice for coding, scripting, and text manipulation tasks. As an Ubuntu 24.04 LTS user, having a reliable and efficient text editor like Sublime Text can significantly enhance your productivity and streamline your workflow.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Sublime Text on Ubuntu 24.04 (Noble Numbat). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

  • A server running one of the following operating systems: Ubuntu and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies.
  • An Ubuntu 24.04 system with root access or a user with sudo privileges.

Install Sublime Text on Ubuntu 24.04

Step 1. Updating the Package Repository.

Before proceeding with the installation, it’s crucial to ensure that your Ubuntu system is up to date. Open a terminal and run the following commands:

sudo apt update
sudo apt upgrade

These commands will update the package lists and upgrade any outdated packages to their latest versions. Depending on your system, this process may take a few minutes to complete.

Step 2. Installing Sublime Text on Ubuntu 24.04.

  • Method 1: Installing Sublime Text Using Snap

Snap is a package management system developed by Canonical, the company behind Ubuntu. It offers a quick and convenient way to install applications on Ubuntu systems. Run the following command to install Sublime Text:

sudo snap install sublime-text

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

sublime-text
  • Method 2: Installing Sublime Text via APT Repository

APT (Advanced Package Tool) is the default package management system in Ubuntu. First, add the GPG key for the Sublime Text repository by running the following command:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null

Next, add the Sublime Text repository to your system’s package sources by running the following command:

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

Install Sublime Text by running the following command:

sudo apt update
sudo apt install sublime-text

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

sublime-text

Install Sublime Text on Ubuntu 24.04

Step 3. Troubleshooting Common Issues.

While the installation process for Sublime Text on Ubuntu 24.04 LTS is generally straightforward, you may encounter some common issues. Here are a few troubleshooting tips to help you resolve them:

  • Missing Dependencies: If you encounter errors related to missing dependencies during the installation process, run the following command to install the required packages:
sudo apt install -y libgtk2.0-0 libgtk2.0-common

This command installs the necessary GTK+ libraries required by Sublime Text.

  • Permission Issues: If you face permission-related issues while installing or running Sublime Text, ensure that you have the necessary permissions to access the installation directory and files. You can use the following command to grant appropriate permissions:
sudo chown -R $USER:$USER /opt/sublime_text

Replace /opt/sublime_text with the actual installation directory if you installed Sublime Text in a different location.

  • Snap Conflicts: If you have previously installed Sublime Text using Snap and encounter conflicts while installing it via APT or manually, you may need to remove the Snap version first. Run the following command to remove the Snap version of Sublime Text:
sudo snap remove sublime-text

After removing the Snap version, you can proceed with the APT or manual installation method.

Congratulations! You have successfully installed Sublime Text. Thanks for using this tutorial for installing Sublime Text on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Sublime Text website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button