GICT knowledge base
How to Use Sublime Text in Linux: Complete Installation, Setup, and Productivity Guide
Published
Sublime Text is loved by developers for its speed, simplicity, and elegant design. It’s more than just a text editor—it’s a robust, cross-platform tool that supports everything from quick script edits to managing large codebases. If you’re a Linux user, Sublime Text is an outstanding choice for your daily work, combining a beautiful interface with powerful features that help you code, write, and organize your projects efficiently.
In this guide, you’ll learn how to install Sublime Text on any major Linux distribution, configure it for your preferences, explore its best features, extend its capabilities, and address common issues. Whether you’re a newcomer or a seasoned developer, this article will help you make Sublime Text your go-to editor on Linux.
Table of Contents
- What is Sublime Text?
- Why Use Sublime Text on Linux?
- Prerequisites
- How to Install Sublime Text on Linux
- Launching and Updating Sublime Text
- Sublime Text Basics: Interface and Workflow
- Installing and Managing Packages with Package Control
- Customizing Sublime Text: Themes, Settings, and Keymaps
- Working with Projects and Folders
- Using Sublime Text for Different Programming Languages
- Productivity Tips and Power User Features
- Troubleshooting and Common Issues
- Frequently Asked Questions (FAQ)
- Conclusion
1. What is Sublime Text?
Sublime Text is a proprietary, cross-platform text editor developed by Jon Skinner. It’s known for its speed, minimalism, and a focus on usability. Sublime Text supports syntax highlighting for over 70 programming and markup languages, offers advanced search tools, and can be heavily extended through packages and plugins.
Key Features:
- Lightning-fast startup and file handling
- Multiple cursors and powerful editing commands
- Command palette for quick access to features
- Distraction-free writing mode
- Rich plugin ecosystem with Package Control
- Cross-platform: works on Linux, Windows, and macOS
2. Why Use Sublime Text on Linux?
- Speed: Sublime Text is incredibly fast, even on older hardware.
- Elegance: The interface is clean, distraction-free, and easy to customize.
- Extensibility: Thousands of packages are available for new languages, themes, linters, git integration, snippets, and more.
- Multi-edit: Edit multiple lines or words at once with multi-cursor support.
- Cross-platform: Seamlessly switch between Linux, Windows, and macOS.
- Great for Coding and Writing: Whether you’re editing code, Markdown notes, or configuration files.
3. Prerequisites
- A Linux system (Ubuntu, Debian, Fedora, CentOS, openSUSE, Arch, etc.)
- Administrator privileges (sudo) for installing packages
- Internet access to download Sublime Text and packages
4. How to Install Sublime Text on Linux
a. Installing via Official Repository (Recommended)
For Debian, Ubuntu, Linux Mint (.deb-based)
Install dependencies and add the Sublime Text GPG key:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo gpg --dearmor -o /usr/share/keyrings/sublimehq-archive-keyring.gpg
Add the Sublime Text repository:
echo "deb [signed-by=/usr/share/keyrings/sublimehq-archive-keyring.gpg] https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Install Sublime Text:
sudo apt update
sudo apt install sublime-text
For Fedora, CentOS, RHEL (.rpm-based)
Add the repository:
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
Install Sublime Text:
sudo dnf install sublime-text
For openSUSE
Add the repository and install:
sudo rpm --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo zypper install sublime-text
b. Installing with Snap (Universal Method)
Sublime Text is available as a Snap package.
sudo snap install sublime-text --classic
c. Downloading and Running the Tarball (Portable)
Download the tarball from the Sublime official site.
Extract it:
tar -xjf sublime_text_build_*.tar.bz2
Run the editor:
cd sublime_text
./sublime_text
You can add this folder to your PATH or create a desktop shortcut for easier access.
5. Launching and Updating Sublime Text
Launching Sublime Text
Launch from your application launcher by searching for “Sublime Text.”
Or, open from the terminal:
subl
Updating Sublime Text
If you used Snap or the repository, updates are automatic with your system updates.
For manual tarball installs, download and replace with the latest version as needed.
6. Sublime Text Basics: Interface and Workflow
The Main Interface
- Sidebar: Displays folders and files in your project.
- Tabs: Each open file is shown as a tab.
- Status Bar: Shows syntax, encoding, and line/column numbers.
- Command Palette: Press
Ctrl+Shift+Pto access commands instantly. - Goto Anything:
Ctrl+Plets you open files, jump to lines, or search symbols.
Editing Essentials
- Multiple Cursors:
Ctrl+Clickto place additional cursors.Ctrl+Dto select the next occurrence of the selected word. - Split Editing: View files side by side (View > Layout).
- Find and Replace:
Ctrl+Ffor find,Ctrl+Hfor replace.
7. Installing and Managing Packages with Package Control
What is Package Control?
Package Control is the package manager for Sublime Text. It gives you access to thousands of plugins, color schemes, and productivity tools.
How to Install Package Control
Usually, Sublime Text 3 and later include Package Control by default. If you need to install it manually:
- Open the command palette (
Ctrl+Shift+P). - Type “Install Package Control” and select the command.
Installing Packages
- Open the command palette (
Ctrl+Shift+P). - Type
Package Control: Install Packageand press Enter. - Search for and select the package you want.
Popular Packages:
- Emmet: Speeds up HTML and CSS workflow.
- SublimeLinter: Code linting for many languages.
- GitGutter: Shows git diff in the gutter.
- BracketHighlighter: Highlights matching brackets.
- SidebarEnhancements: Adds more options to the sidebar.
- Theme – Soda or Material Theme: Improve the look and feel.
Managing Packages
- Remove a package: Use
Package Control: Remove Package. - List installed packages: Use
Package Control: List Packages.
8. Customizing Sublime Text: Themes, Settings, and Keymaps
Themes and Color Schemes
Browse themes in Preferences > Color Scheme or Preferences > Theme.
Install new ones via Package Control (search “theme” or “color scheme”).
Changing Settings
Settings are in JSON. Access from Preferences > Settings.
You have a split view: default settings (left), your custom settings (right).
{
"font_size": 14,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"word_wrap": true
}
Key Bindings
Edit or add custom key bindings via Preferences > Key Bindings.
[
{ "keys": ["ctrl+shift+s"], "command": "save_all" }
]
9. Working with Projects and Folders
- Open a folder as a project:
File > Open Folder. - Save your project for quick access later:
Project > Save Project As. - Use the sidebar to create, rename, or delete files and folders.
- Switch between projects:
Project > Quick Switch Project.
Tip: Projects remember open files, folders, and settings.
10. Using Sublime Text for Different Programming Languages
Sublime Text detects language modes automatically, but you can set syntax from the status bar or Command Palette.
Install language-specific plugins for Python, JavaScript, PHP, Go, etc.
Syntax highlighting, snippets, build systems, and linting are available for most major languages.
Use the build system (Ctrl+B) to run or compile code (customizable per language).
11. Productivity Tips and Power User Features
- Goto Anything: Jump between files, lines, or symbols with
Ctrl+Pand fuzzy search. - Multiple Selections: Edit several lines at once—
Ctrl+Dselects the next word,Ctrl+Lselects entire lines. - Command Palette:
Ctrl+Shift+Pgives you instant access to every command, package, and setting. - Distraction-Free Mode:
Shift+F11for a clean, full-screen writing environment. - Macros: Record a sequence of actions (
Tools > Record Macro) and replay them to automate repetitive tasks. - Snippets: Create your own code templates. Go to
Tools > Developer > New Snippet. - Split Editing and Layouts: Arrange windows and files across multiple columns or rows for side-by-side work.
- Bookmarks: Place bookmarks with
Ctrl+F2and move between them withF2.
12. Troubleshooting and Common Issues
Sublime Text Won’t Launch
Run subl in the terminal for debug output.
Check that it’s installed correctly:
which subl
If using Snap, run:
snap run sublime-text
Command Not Found
If subl is not recognized, make sure /usr/bin or the Snap bin directory is in your PATH.
For tarball installs, symlink the binary:
sudo ln -s /path/to/sublime_text/sublime_text /usr/local/bin/subl
Can’t Install Packages
Check your internet connection.
If behind a proxy, set proxy settings in Preferences > Package Settings > Package Control > Settings.
File Permission Problems
Make sure you own the project files and are not running Sublime as root.
High DPI or Font Issues
Tweak "dpi_scale": 1.5 or adjust "font_size" in your user preferences.
13. Frequently Asked Questions (FAQ)
- Q: Is Sublime Text free?
A: Sublime Text can be used for free (evaluation), but a license is required for long-term, unrestricted use. - Q: Can I use Sublime Text for Python/JavaScript/Java/etc.?
A: Yes! Install language-specific plugins and build systems for enhanced support. - Q: How do I uninstall Sublime Text?
A: Use your package manager (sudo apt remove sublime-text,sudo dnf remove sublime-text, orsudo snap remove sublime-text). - Q: Does Sublime Text support plugins from other editors?
A: Yes! Install plugins like “Vintage” for Vim or relevant keymap plugins for other editors. - Q: Can I sync Sublime Text settings across computers?
A: Use services like Dropbox or Git to sync your Packages/User folder, or look for community sync plugins. - Q: Can I use Git in Sublime Text?
A: Yes—install packages like GitGutter or Sublime Merge integration for enhanced version control.
14. Conclusion
Sublime Text is a powerful, fast, and visually pleasing editor that fits right in with the Linux philosophy of efficiency and customization. Thanks to its cross-platform nature, you can keep the same workflow regardless of your operating system. With Package Control, themes, and a wealth of productivity features, it’s easy to mold Sublime Text into your perfect coding companion.
By following this guide, you’ve learned how to install Sublime Text on Linux, customize its look and feel, extend its capabilities, and use it for any programming or writing task. Whether you’re editing a quick shell script or managing a complex software project, Sublime Text is up to the challenge.
Explore the package ecosystem, master the keyboard shortcuts, and enjoy the frictionless experience that has made Sublime Text a favorite of professionals and hobbyists alike.
Related guides
How to Set Up zram on a Small VPS
Configure zram on Ubuntu with kernel and swap checks. Understand compressed memory limits, monitor real use and avoid unsafe swap-file changes.
LinuxHow to Find Services That Need a Restart After Updates with needrestart
Find services using outdated libraries with needrestart on Ubuntu. Read restart reports, review automatic restart policy and plan maintenance safely.
LinuxHow to Limit a Linux Service’s Memory with systemd
Limit a Linux service with systemd MemoryHigh, MemoryMax and swap controls. Check cgroup support, diagnose pressure and remove only your own policy.
LinuxHow to Protect SSH with CrowdSec on Ubuntu
Protect SSH with CrowdSec on Ubuntu. Connect log detection to firewall enforcement and test temporary blocking without losing administrator access.
