This article shows how to install Sublime text 4 on Ubuntu 22.04, 20.04 Linux. Sublime Text is a flexible, lightweight, low-resource code editor favored by many developer today. If you are struggling to find a code editor with good support but fast startup speed, this is the best choice in 2024 for you.
Install and Activate Sublime Text 4 on Ubuntu 22.04, 20.04 Linux
The APT repository contains packages for both x86-64 and arm64 architectures. To begin, you need to add the repository to your Ubuntu system.
Step 1. Add the GPG key Sublime Text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null
Ensure APT is set up to work with HTTPS sources and Import Sublime Text 4 APT Repository
sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Step 2. Install Sublime Text 4 Ubuntu 22.04
After adding the key and repository, update your system to make the repository effective. Subsequently, you can install Sublime Text 4 on Ubuntu 22.04, Linux using the command in the terminal.
sudo apt-get update sudo apt-get install sublime-text
Step 3. Activate Sublime text with License key (Unlimited)
Method 1: Activate Sublime text 4 license Ubuntu Using sed Command
This method is relatively straightforward and efficient; we successfully tested the Sublime Text 4 license on Ubuntu 22.04. To do this, open the terminal and run the command below:
sudo cp -R /opt/sublime_text/sublime_text /opt/sublime_text/sublime_text.backup sudo sed -i 's/\x80\x78\x05\x00\x0f\x94\xc1/\xc6\x40\x05\x01\x48\x85\xc9/g' /opt/sublime_text/sublime_text
After running the (sed) command to activate Sublime Text 4 license Ubuntu, if any errors occur when you open Sublime Text 4, delete the “sublime_text” file, then rename “sublime_text.backup” to “sublime_text” to restore it to its original state.
sudo rm -rf /opt/sublime_text/sublime_text sudo mv /opt/sublime_text/sublime_text.backup /opt/sublime_text/sublime_text
Method 2: Editing HEX Code to Activate Sublime Text 4
Backup the file “/opt/sublime_text/sublime_text” for restoration in case of errors.
- Access the HexEd.it website. You can use a DNS in case your geographical location is restricted.
- Click “Open file” and locate the sublime_text file on your computer.
- Find the string “80 78 05 00 0F 94 C1” and sequentially replace the values with “C6 40 05 01 48 85 C9”.
- Export the modified file and save it as sublime_text on your computer.
- Copy and overwrite the saved “sublime_text” file into the /opt/sublime_text/ directory.
Done! Now, open Sublime Text 4 and use it with the perpetual Unlimited License.
How to remove Sublime text on Ubuntu Linux
Run the commands below one by one to completely remove sublime text on your computer.
sudo apt-get remove sublime-text sudo rm -rf /home/$USER/.config/sublime-text sudo rm -rf /opt/sublime_text sudo apt update
Above are the steps to guide how to install Sublime text 4 on Ubuntu 22.04 Linux, and how to enable sublime text Ubuntu. Hope it helps you.
– Advertising –