Debian

How to Install Sublime Text 4 on Debian 12?

how to install sublime text 3 on debian 12

Sublime Text is a free, popular, and powerful text editor that offers customization options, plugins, and a wide range of features like auto-completion, syntax highlighting, shortcuts, etc. which increases the productivity of software developers. Additionally, sublime text can be used by anyone for text editing purposes only.

In this article, we will discuss ways to install Sublime Text 4 on the Debian 12 (Bookworm) system.

How to Install Sublime Text 4 on Debian 12?

Sublime Text 4 can be installed on Debian 12 systems using below-listed methods:

  • Method 1: Installing Sublime Text 4 Using the APT Package Manager
  • Method 2: Installing Sublime Text 4 Using DPKG Package Manager
  • Method 3: Installing Sublime Text 4 Using GDEBI Package Manager

We will discuss all these methods in detail in the following sections.

Method 1: Installing Sublime Text 4 Using the APT Package Manager

Sublime Text can be installed using the apt package manager by the following steps:

Step 1: Launch Terminal

The first step is to launch Terminal. It can be launched either by using the shortcut Ctrl+Alt+T or by using an Application launcher:

The following screenshot shows how the Terminal Application looks like on Debian:

Step 2: Install GPG Key

The first step is to add the GPG (GNU Privacy Guard) key. This can be done by the below command:

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

Step 3: Select Channel (Stable or Developer)

Sublime Text 4 can be installed either by using the Stable version or the Development version. The stable version is the final release of software and is tested by the community before getting released, while, the development version is for testers/developers to test and preview the version.

We will proceed with the installation of the stable version of Sublime Text by running the following command:

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

In case, there is a need for the Developer (Dev) version, the following command can be used:

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

Step 4: Update apt Sources/Packages

It is highly recommended to make sure that all existing packages are up to date before installing any software. This is to avoid dependency issues. We can do that by running the following command as root or user with sudo privileges:

$ sudo apt update

Step 5: Install Sublime Text

Sublime Text can be installed using the following command:

$ sudo apt-get install sublime-text

Optional: If there is any error in this step, we have to check if the apt is set up to work with HTTP sources by running the following command:

$ sudo apt-get install apt-transport-https

Step 6: Launching Sublime Text 4 on Debian

We can launch Sublime Text 4 in the following ways:

  • Command line
  • Application Launcher

Command Line

We can launch Sublime Text by command line by typing “subl” on the terminal:

$ subl

It launches the below interface:

Application Launcher

We can launch “Sublime Text” by application launcher by pressing the “Activities” button in the left corner of the screen, then by typing “Sublime Text” in the search bar, and then by selecting the Sublime Text icon:

Method 2: Installing Sublime Text 4 Using DPKG Package Manager

Sublime Text can be installed using the dpkg package manager by the following steps:

Step 1: Download the .deb package

We can download the .deb package from this link by selecting the downloads button as shown below:

The download button will redirect us to a new webpage. We can then click the “direct downloads” button:

This will redirect us to a page with Linux repos. Here, we will download the .deb package depending on our processor:

The .deb package – sublime-text_build-4152_amd64.deb is downloaded in the Downloads folder (by default).

We will launch the terminal (as shown in Step 1 of Method 1) and update apt packages as shown in Step 4 of Method 1. Then, we can navigate to the .deb package using the “cd” command as shown below:

Step 2: Install .deb Package

The .deb package will be installed by running the following command:

$ sudo dpkg -i sublime-text_build-4152_amd64.deb

After installation, we can launch Sublime Text either by command line or by Application Launcher as shown in Step 6 in Method1.

Method 3: Installing Sublime Text 4 Using GDEBI Package Manager

Gdebi is one of the most reliable package installers in Linux distributions. It installs local packages to resolve the dependencies of the package. Gdebi is not pre-installed in Debian, so we have to install it using the following steps:

Step 1: Install Gdebi Package Manager

The Gdebi package installer is not pre-installed in Debian. We can use apt package to install the gdebi package manager by using the following command:

$ sudo apt install gdebi

Step 2: Install .deb Package

The .deb package can be downloaded as shown in Step 1 in Method 2. Additionally, before installing the .deb package, we will open the terminal (as shown in Step 1 of Method 1) and update apt packages as shown in Step 4 of Method 1. Next, we will navigate to the Downloads folder using the “cd” command and install the .deb package:

Step 3: Installing Sublime Text 4

We can install the Sublime Text 4 and its dependencies file by the following command:

$ sudo gdebi sublime-text_build-4152_amd64.deb

After installation, we will launch Sublime Text either by command line or by Application Launcher as shown in Step 6 of Method1.

How to Uninstall Sublime Text 4 on Debian 12?

To completely uninstall Sublime Text from our device, we can run the following command:

$ sudo apt remove --autoremove sublime-text

Press “Y” at the prompt to continue with the uninstallation process.

What are the Features of Sublime Text 4?

Sublime Text 4 is the most recent version of Sublime Text and it comes with the following features:

  • GPU Rendering
  • Tab multi-select
  • Context-Aware Auto Complete
  • Refreshed UI
  • Support for Typescript, JSX, and TSX
  • Superpowered Syntax Definitions
  • Updated Python API

That is all from the guide.

Conclusion

To install Sublime Text 4 on Debian 12 (Bookworm) operating systems, users can utilize the apt, dpkg, and gdebi package managers. Sublime Text is very popular in the developer community. It provides various features and plugins to assist software developers and programmers. This article has discussed three methods of installing Sublime Text 4 on Debian 12 (Bookworm) systems, i.e., by using the official repository and by using dpkg and gdebi package managers.

Similar Posts