How to Install Sublime Text on Ubuntu 24.04
Learn how to install Sublime Text on Ubuntu 24.04 LTS using the official APT repository, GPG keyring, Package Control, and the subl CLI tool.

6 min read
Learn how to install Sublime Text on Ubuntu 24.04 LTS using the official APT repository, GPG keyring, Package Control, and the subl CLI tool.
- Prerequisites and Supported Releases
- Method 1: Installing Sublime Text via Official APT Repository (Recommended)
- Method 2: Installing Sublime Text via Snap Store
When working across massive log files, full codebases, and prose documents, software developers demand an editor that starts instantaneously and handles multi-megabyte files without lag. When you install sublime text on ubuntu 24.04, you deploy one of the fastest native desktop text editors ever engineered, featuring hardware-accelerated GPU rendering, multi-cursor editing, split-layout workspaces, and a vast ecosystem of custom plugins.
On Ubuntu 24.04 LTS, Sublime Text is officially distributed through Sublime HQ's dedicated APT repository, ensuring seamless integration with standard system updates and complete native desktop performance. Alternatively, users can deploy Sublime Text via the Snap Store. This guide covers repository configuration with modern Debian keyring standards, command-line launcher setup, and Package Control configuration.
Sublime Text is a lightning-fast, sophisticated text and code editor praised for its ultra-responsive interface, GPU hardware acceleration, and powerful plugin ecosystem. This tutorial demonstrates how to install Sublime Text on Ubuntu 24.04 LTS using the official Sublime Text APT repository and Snap, configure the subl command-line tool, and set up Package Control.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- An active installation of Ubuntu 24.04 LTS with a graphical desktop environment.
- A user account with active sudo administrative privileges.
- An active Internet connection to download packages from Sublime HQ.
- At least 200 MB of free disk storage.
Method 1: Installing Sublime Text via Official APT Repository (Recommended)
Installing via the official Sublime HQ repository provides native deb packaging, direct desktop theme matching, and automated updates whenever you execute sudo apt upgrade.
First, install the required cryptographic and transport dependencies via APT.
# Update package database and install repository prerequisites
sudo apt update
sudo apt install -y curl gpg apt-transport-https ca-certificates
Importing the Sublime HQ GPG Key into /etc/apt/keyrings
In accordance with Ubuntu 24.04 security guidelines, store the dearmored Sublime HQ GPG signing key in /etc/apt/keyrings/sublimehq-pub.gpg:
# Ensure the keyrings directory exists
sudo install -m 0755 -d /etc/apt/keyrings
# Download and dearmor Sublime HQ public signing key
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/sublimehq-pub.gpg > /dev/null
# Set correct read permissions
sudo chmod 0644 /etc/apt/keyrings/sublimehq-pub.gpg
Adding the Stable Repository Source Definition
Create the repository source file referencing the newly installed keyring using the signed-by attribute:
# Add the stable Sublime Text APT repository
echo "deb [signed-by=/etc/apt/keyrings/sublimehq-pub.gpg] https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Installing Sublime Text via APT
Refresh your local APT cache and install the sublime-text package:
# Update package metadata
sudo apt update
# Install Sublime Text
sudo apt install -y sublime-text
Method 2: Installing Sublime Text via Snap Store
If you prefer automated containerized deployment without adding third-party APT repositories, Sublime Text is officially published on the Snapcraft Store.
Install Sublime Text with classic containment enabled:
# Install Sublime Text via Snap with classic filesystem access
sudo snap install sublime-text --classic
Step 3: Launching Sublime Text and Using the subl Command-Line Tool
The -n flag opens a new window, while -w instructs the terminal to wait until you close the editor tab before finalizing the Git commit.
# Open the current directory as a project workspace
subl .
# Open a specific file
subl /etc/nginx/nginx.conf
# Use Sublime Text as the default Git commit editor
git config --global core.editor "subl -n -w"
Step 4: Setting Up Package Control and Community Extensions
Package Control is the official package manager for Sublime Text, allowing you to discover, install, and update thousands of community plugins, syntax themes, and linters.
In modern Sublime Text (version 4), Package Control is built-in:
1. Open Sublime Text.
2. Press Ctrl+Shift+P to open the Command Palette.
3. Type Install Package Control and press Enter.
Once Package Control is initialized, open the Command Palette again, type Package Control: Install Package, and search for popular extensions.
Integrating the Language Server Protocol (LSP) package transforms Sublime Text from a lightweight text editor into a modular, blisteringly fast IDE. By connecting to standard language servers (such as pyright for Python, gopls for Go, or typescript-language-server), developers enjoy real-time type checking, hover tooltips, and symbol renaming without sacrificing Sublime Text's sub-second startup performance.
| Plugin / Package | Ecosystem Function | Developer Productivity Benefit |
|---|---|---|
| LSP (Language Server Protocol) | Code Intelligence | Provides auto-complete, diagnostics, and refactoring identical to full IDEs. |
| GitGutter | Version Control | Displays interactive diff indicators in the editor gutter for modified git lines. |
| Emmet | Web Engineering | Expands high-speed HTML and CSS abbreviation snippets instantaneously. |
| A File Icon | Visual File Tree | Adds customized modern file-type icons to the sidebar navigation tree. |
| SideBarEnhancements | File Management | Provides comprehensive context menu operations (cut, copy, duplicate, search) to the sidebar. |
Step 5: Updating and Completely Removing Sublime Text
If installed via the official APT repository, Sublime Text updates automatically during standard sudo apt upgrade runs.
To completely uninstall Sublime Text and remove repository keys:
# If installed via APT:
sudo apt purge -y sublime-text
sudo rm -f /etc/apt/sources.list.d/sublime-text.list
sudo rm -f /etc/apt/keyrings/sublimehq-pub.gpg
# If installed via Snap:
sudo snap remove sublime-text
# Remove user configuration, installed packages, and session state:
rm -rf ~/.config/sublime-text
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
subl: command not found after APT installation.
Cause: The terminal session needs to refresh its command hash cache.
Resolution: Reload your shell hash table by typing hash -r or open a new terminal window.
hash -r
Sublime Text crashes or flickers on Wayland desktop sessions.
Cause: Hardware GPU acceleration conflicts with specific proprietary graphics drivers.
Resolution: Add "hardware_acceleration": "none" to your Preferences.sublime-settings file.
subl ~/.config/sublime-text/Packages/User/Preferences.sublime-settings
Package Control: Unable to download packages / SSL error.
Cause: Missing system root CA certificates or restrictive outbound firewall.
Resolution: Ensure ca-certificates is up to date: sudo apt install --reinstall ca-certificates.
sudo apt install --reinstall ca-certificates
Security Best Practices and Hardening
Always verify repository keys are sourced from download.sublimetext.com and imported into /etc/apt/keyrings rather than deprecated global keyrings.
Review community Package Control plugins prior to installation, as extensions run with the full permissions of your user account.
Never execute the Sublime Text GUI editor using sudo, as running desktop applications as root can corrupt file permissions in your user home directory.
Keep license keys and sensitive configuration files protected by setting appropriate Unix permissions (chmod 600) on your Sublime Text User settings folder.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- How to Install Visual Studio Code on Ubuntu 24.04 — Compare lightweight Sublime Text with Visual Studio Code's extensible IDE features.
- How to Install Git on Ubuntu 24.04 LTS — Configure Git version control with Sublime Text as your default interactive editor.
- How to Install and Use Zsh on Ubuntu — Optimize command-line productivity with Zsh aliases and the subl launcher.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
ssh -X) or edit remote files locally using the SFTP plugin or VS Code Remote-SSH./etc/apt/sources.list.d/sublime-text.list, change apt/stable/ to apt/dev/ and execute sudo apt update && sudo apt upgrade.~/.config/sublime-text/Packages/User/.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!