How to Install Sublime Text 4 on Ubuntu Linux 22.04 or 20.04

Sublime Text 4, the latest iteration of the popular source code editor, offers many new features and improvements. This guide focuses on how to install Sublime Text 4 on Ubuntu 22.04 Jammy Jellyfish or Ubuntu 20.04 Focal Fossa using the Sublime APT PPA. The method is also applicable to short-term Ubuntu releases.

Key Features of Sublime Text 4

  • Performance: The new version is optimized for speed and efficiency.
  • Python API: Updated to Python 3.8, facilitating modern plugin development.
  • AutoComplete: Enhanced with Tabnine AI code completion integration.
  • GPU Rendering: Hardware acceleration option available.
  • User Interface: New tabs, themes, and customization options.
  • Platform Support: Native support for Apple Silicon and Linux ARM64.

Additional Highlights

  • Multi-Selection: Easier creation of complex selections.
  • TypeScript Support: Built-in support is now included.
  • Syntax Highlighting: More precise and visually appealing.

Sublime Text 4 builds on its reputation as a reliable and efficient code editor by integrating these cutting-edge features and optimizations. The guide will provide the technical steps for installing Sublime Text 4 on Ubuntu, allowing you to take full advantage of this advanced editor for your development projects.

Section 1: Install Sublime Text 4 on Ubuntu 22.04 or 20.04 via APT

Step 1: Update Ubuntu System Packages Before Sublime Text 4 Installation

Begin by preparing your Ubuntu system for the installation of Sublime Text 4. It is essential to update your system’s existing software packages to the latest versions. Keeping your packages up-to-date mitigates potential conflicts and compatibility issues with new software installations. Execute the following command in your terminal:

sudo apt update && sudo apt upgrade

This command utilizes sudo to execute the update with administrative privileges, apt update to refresh the package lists, and apt upgrade to install the newest versions of all packages currently installed on the system.

Step 2: Install Initial Packages for Sublime Text 4 on Ubuntu

Sublime Text 4 requires specific dependencies for proper functioning. Most Ubuntu systems may already have these dependencies installed. However, to ensure their presence and avoid any issues during installation, execute the following command:

sudo apt install software-properties-common apt-transport-https curl ca-certificates -y

Here, software-properties-common allows you to manage the repositories from which software packages are available. apt-transport-https is essential for securely accessing web repositories, transferring data using various protocols, and establishing secure web connections.

Step 3: Add Sublime Text APT PPA on Ubuntu 22.04 or 20.04

To install Sublime Text 4 using the APT manager, a third-party repository or a “PPA” (Personal Package Archive) needs to be integrated. First, import the GPG key, which is essential for secure communication. This can be done using the following command:

curl -fSsL | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq-pub.gpg > /dev/null

With the GPG key imported, proceed to add the Sublime Text repository to your system’s software sources list using the command:

Option 1: Import Sublime Text 4 Stable (Recommended) on Ubuntu 22.04 or 20.04

echo 'deb [signed-by=/usr/share/keyrings/sublimehq-pub.gpg] apt/stable/' | sudo tee -a /etc/apt/sources.list.d/sublime-text.list

Option 2: Import Sublime Text 4 Dev Repository on Ubuntu 22.04 or 20.04

echo 'deb [signed-by=/usr/share/keyrings/sublimehq-pub.gpg] apt/dev/' | sudo tee -ta /etc/apt/sources.list.d/sublime-text.list

This command appends the Sublime Text repository address to the system’s software sources list. Note: If you import both, the developer version will be prioritized to be installed.

Step 4: Update Package Index and Install Sublime Text 4 on Ubuntu 22.04 or 20.04

After adding the Sublime Text repository, updating the APT package index is essential to be aware of the new repository and its packages. Execute the following command:

sudo apt update

Now that the system is primed, proceed to install Sublime Text 4 by executing:

sudo apt install sublime-text

This command downloads and installs the latest version of Sublime Text 4 from the repository that was just added.

subl --version

Section 2: Launching Sublime Text 4 on Ubuntu 22.04 or 20.04

Launching Sublime Text 4 from the Terminal on Ubuntu

Now that Sublime Text 4 is installed, it’s time to launch it. One way to open the editor is through the terminal. This method can be beneficial if you are already working within the terminal and want to open the editor quickly. Enter the following command:


Launching Sublime Text 4 via Graphical User Interface on Ubuntu

Sublime Text 4 can also be launched through the desktop environment for a more visual approach. On your desktop, navigate the application menu by clicking “Applications.” You can either scroll through the installed applications to find Sublime Text or use the search bar for quicker access. Type “Sublime Text” in the search bar and click on the application once it appears.

This method is practical when you are not working in the terminal and prefer using the graphical interface for navigation. It’s also a more intuitive way for those who might not be accustomed to working with terminal commands.

Applications > Search > Sublime Text.
Sublime Text 4 Application Icon on Ubuntu 22.04 or 20.04 Linux - Click to LaunchPin
Screenshot showing the Sublime Text 4 application icon on an Ubuntu 22.04 or 20.04 desktop, ready to be clicked for launch.

Section 3: Tips for Getting Started with Sublime Text 4 on Ubuntu 22.04 or 20.04

Step 1: Customize the User Interface on Sublime Text 4 and Ubuntu

One of the first things you’ll notice about Sublime Text 4 is its sleek and uncluttered user interface. However, as developers have different preferences, customizing the user interface to suit your needs can enhance your experience. You can modify the theme, color scheme, and font by navigating to Preferences -> Settings and editing the JSON configuration file. For example, to change the color scheme, you could add:

"color_scheme": "Monokai.sublime-color-scheme"

Step 2: Make Use of Distraction Free Mode on Sublime Text 4 and Ubuntu

When coding, staying focused is crucial. Sublime Text 4 provides a Distraction Free Mode that you can access by going to View -> Enter Distraction Free Mode. This mode minimizes UI elements and maximizes the text area, letting you concentrate solely on your code.

Step 3: Utilize Multiple Cursors and Selections on Sublime Text 4 and Ubuntu

Sublime Text 4 on Ubuntu Linux offers multiple cursors and selections, which can significantly increase coding efficiency. Hold the Ctrl key and click different areas to place multiple cursors, or use the Ctrl + Shift + L shortcut to create a cursor at the end of each selected line.

Step 4: Employ the Command Palette on Sublime Text 4 and Ubuntu

The Command Palette is a powerful feature in Sublime Text 4 that provides quick access to almost every function. Press Ctrl + Shift + P to open the Command Palette, and start typing a command or action name. This is especially useful for accessing commands that don’t have a designated keyboard shortcut.

Step 5: Leverage the Goto Anything Feature on Sublime Text 4 and Ubuntu

Navigation is essential, especially when working with large codebases. Sublime Text 4 offers the Goto Anything feature, allowing rapid file switching and navigation to specific lines or symbols. Press Ctrl + P to invoke this feature, start typing to search or navigate through files.

Step 6: Install Package Control and Extensions on Sublime Text 4 and Ubuntu

Extend Sublime Text 4’s functionality by installing Package Control, allowing easy plugins, themes, and extensions to be managed efficiently. To install Package Control, open the Command Palette (Ctrl + Shift + P), type “Install Package Control”, and hit Enter. Once installed, you can discover and install many plugins and extensions that cater to your needs.

Step 7: Configure Build Systems on Sublime Text 4 and Ubuntu

Sublime Text 4 lets you configure build systems for different programming languages. This can streamline your workflow by enabling you to compile and run code directly within the editor. Navigate to Tools -> Build System to choose an existing build system or select New Build System to create a custom one.

Step 8: Explore Keyboard Shortcuts on Sublime Text 4 and Ubuntu

Efficiency is key in development, and mastering keyboard shortcuts is one way to save valuable time. Sublime Text 4 boasts a comprehensive set of shortcuts. Familiarize yourself with these by checking the available shortcuts under Preferences -> Key Bindings, and consider customizing them according to your preferences.

Sublime Text 4 Successfully Installed on Ubuntu 22.04 or 20.04 Linux - Application Open and Ready to UsePin
Screenshot demonstrating that Sublime Text 4 has been successfully installed and is open on Ubuntu 22.04 or 20.04 Linux.

Section 4: Managing Sublime Text 4 on Ubuntu 22.04 or 20.04

How to Remove Sublime Text 4 from Ubuntu

If you find Sublime Text 4 no longer meets your requirements or you need to make space for an alternative text editor, removing it from your Ubuntu Linux system is simple. This ensures that you keep your system uncluttered and manage resources effectively.

Remove Sublime Text 4 Application from Ubuntu APT command:

Execute the following command in your terminal to uninstall Sublime Text 4:

sudo apt remove sublime-text

This command communicates with your package manager to remove Sublime Text 4 from your system.

Remove Sublime Text 4 Repository from Ubuntu APT command:

After uninstalling the application, removing the repository from which it was installed is a good practice. This is especially necessary if you are considering switching between the development and stable branches of Sublime Text or if you want to ensure no conflicts or unnecessary updates from this repository in the future.

Execute the following command to remove the repository:

sudo rm /etc/apt/sources.list.d/sublime-text.list

This command deletes the Sublime Text list file from your sources list, removing the repository.

Remove Sublime Text 4 GPG Key from Ubuntu APT command:

Suppose you are sure that you will not be using Sublime Text again and wish to do a thorough cleanup. In that case, you can remove the GPG key used for verifying the integrity of packages from Sublime Text’s repository.

Execute this command to remove the GPG key:

sudo rm /usr/share/keyrings/sublimehq.gpg

Please note that this step is optional and is generally only necessary to ensure that all traces of Sublime Text are removed from your system.


In this guide, we have provided comprehensive steps to install and configure Sublime Text 4 on Ubuntu 22.04-20.04. Starting with the installation process, we delved into how to launch the application effectively and offered valuable tips for getting started. Furthermore, if Sublime Text 4 is not a good fit for your needs, we included steps to remove it cleanly from your system.

Share to...