Website Vidya
Linux & ServersStep-by-Step Guide

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.

RR
Rajesh RayLead Systems Educator
Published:
6 min read
PDF Cheat Sheet
How to Install Sublime Text on Ubuntu 24.04
AI Executive SummaryWebsiteVidya AI

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.

Key Highlights
  • Prerequisites and Supported Releases
  • Method 1: Installing Sublime Text via Official APT Repository (Recommended)
  • Method 2: Installing Sublime Text via Snap Store
Grounded in full engineering runbookWebsiteVidya AI Engine

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.

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.

Advertisement

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.

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:

Advertisement
# 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:

Advertisement
# 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 / PackageEcosystem FunctionDeveloper Productivity Benefit
LSP (Language Server Protocol)Code IntelligenceProvides auto-complete, diagnostics, and refactoring identical to full IDEs.
GitGutterVersion ControlDisplays interactive diff indicators in the editor gutter for modified git lines.
EmmetWeb EngineeringExpands high-speed HTML and CSS abbreviation snippets instantaneously.
A File IconVisual File TreeAdds customized modern file-type icons to the sidebar navigation tree.
SideBarEnhancementsFile ManagementProvides 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.

Deepen your Linux system administration skills with our related production-tested guides:

Authoritative References and Official Documentation

Frequently Asked Questions

Quick answers to common questions and configurations

4 FAQs
Sublime Text may be downloaded and evaluated for free without an enforced time limit. However, a license must be purchased for continued use, and an evaluation notification appears periodically upon saving.
Sublime Text is a graphical application requiring an X11 or Wayland display server. For headless remote server editing, use SSH X11 forwarding (ssh -X) or edit remote files locally using the SFTP plugin or VS Code Remote-SSH.
In /etc/apt/sources.list.d/sublime-text.list, change apt/stable/ to apt/dev/ and execute sudo apt update && sudo apt upgrade.
User settings, keybindings, and installed packages are stored in ~/.config/sublime-text/Packages/User/.
RR
Written byVerified Author

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.

SPAM-FREE MODERATED DISCOURSE

Join the Conversation & Perspective

Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.

AT
MP
JV
+2

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout