This article shows how to install Sublime Text 4 on Ubuntu 22.04/24.04. Sublime Text is a flexible, lightweight, low-resource code editor favored by many developers. If you’re looking for a code editor with good support and fast startup speed, this could be the best choice for you in 2024.
Install and Activate Sublime Text Free License 4 on Ubuntu
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
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: Block Sublime text host
Open the hosts file:
sudo nano /etc/hosts
And add the following code at the end:
# Block Sublime Text 4 hosts 127.0.0.1 license.sublimehq.com 127.0.0.1 45.55.255.55 127.0.0.1 45.55.41.22
Save and close the hosts file.
Step 4. Activate Sublime text License key (Unlimited)
Method 1: 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: Using Editing HEX Code
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.
Step 5: Add Sublime Text 4 License key
Open Sublime Text, click on Help -> Enter License, and enter the key below:
—– BEGIN LICENSE —– https://itsmeit.co/ Unlimited User License EA7E-81044230 0C0CD4A8 CAA317D9 CCABD1AC 434C984C 7E4A0B13 77893C3E DD0A5BA1 B2EB721C 4BAAB4C4 9B96437D 14EB743E 7DB55D9C 7CA26EE2 67C3B4EC 29B2C65A 88D90C59 CB6CCBA5 7DE6177B C02C2826 8C9A21B0 6AB1A5B6 20B09EA2 01C979BD 29670B19 92DC6D90 6E365849 4AB84739 5B4C3EA1 048CC1D0 9748ED54 CAC9D585 90CAD815 —— END LICENSE ——
Done! Now, open Sublime Text 4 and use it with the perpetual Unlimited License.
With Sublime Text 4 successfully installed on your Ubuntu 22.04 LTS system, you’re now ready to experience its powerful features and streamlined coding environment. Happy coding!