Text editors are primarily used to write or edit codes relating to different programming languages. The sublime text holds significant ground among various text editors because of its customizability and features like split editing, command palette, and instant project switching. On the Debian operating system, sublime text can be integrated with various compilers which helps in compiling and editing codes simultaneously.
3- Ways To Install Sublime Text on Debian
Sublime text works seamlessly with large code files as it is pretty much responsive and other than that it comes with cross-platform compatibility. This guide will elaborate on 3 ways to install Sublime text on Debian:
1: Through Sublime Text Repository
Since the apt package manager does not contain the repository for sublime text on Debian, its repository can be added manually, and before that adding its GPG key is necessary for package validation:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null
There are two versions of Sublime Text, one is the stable version while the other one is the developer version so here I have added the repository for the stable version:
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Next, update the apt packages list to complete the repository addition:
sudo apt update
Now install the sublime text via the apt package manager:
sudo apt install sublime-text -y
To verify the installation, check the version for Sublime Text by using the below command:
subl --version
2: Through Deb File
Another method to install Sublime Text is to use its deb file and there are two ways to download it, one is by executing the below command:
https://download.sublimetext.com/sublime-text_build-4192_amd64.deb
Alternatively, download the file directly from the sublime text download page, click on the deb file:
Now use the apt package manager to install Sublime Text via its deb file on Debian by running:
sudo apt install ./sublime-text_build-4192_amd64.deb
To launch Sublime Text either use the command below or search for Sublime in the apps menu:
subl
3: Through Tar File
Sublime text also comes with its pre-installed or plug-and-play version in the form of a compressed file available on its downloads page. The tar file can be downloaded directly as in the image below:
On the other hand, use the below command to download the tar file for Sublime Text:
wget https://download.sublimetext.com/sublime_text_build_4192_x64.tar.xz
Next, extract the tar file and prefer not to use the sudo privileges as there might be some permissions issues while launching it:
tar -xf sublime_text_build_4192_x64.tar.xz
Now navigate to the Sublime Text extracted directory and launch its app file:
./sublime_text
Conclusion
This guide discussed three ways to install Sublime Text on Debian: using its repository, deb file, and tar file. The preferred method for installing it is using the tar file as this is a pre-installed version that requires no prior installation steps. Furthermore, to get its developer version, use the first installation by adding the repository for its developer version.