Archives For November 30, 1999

This is a step by step beginner’s guide shows how to install Sublime Text code editor in Ubuntu 22.04 and Ubuntu 24.04.

Sublime Text is available to install in Ubuntu Linux through 3 different ways. They include:

  • Snap package – maintained by contributors.
  • Deb pacakge – through its official repository.
  • Flatpak package (Sublime Text 3) – maintained by contributors.

Option 1: Snap package

A group of contributers maintain the text editor in Snap package format, which runs in sandbox. The package so far supports amd64 (Intel/AMD) and arm64 (Raspberry Pi) devices.

Ubuntu 20.04 and higher can simply search for and install it from Ubuntu Software (or App Center):

Sublime Text Snap package in Ubuntu Software / App Center

The snap package runs in sandbox and always up-to-date since it receives updates automatically. The only downside could be that some do NOT like sandboxing apps.

For those prefer Linux commands, the package also can be installed by running the command below in terminal:

sudo snap install sublime-text --classic

Option 2: Official Apt repository (.deb package)

This is the official .deb package works in Ubuntu, Linux Mint, Debian, and even Raspberry Pi OS (arm64).

1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to make sure ‘https’ source is supported:

sudo apt install apt-transport-https

2. Add the repository key

The sublime text website still use the ‘apt-key‘ command in its document, which is deprecated.

For security reason, Debian has updated the policy. And, it’s recommend to use the command below instead to install the key:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/sublimehq-pub.gpg

It will download the key from its website, convert it to un-readable encrypted key, and put into “/etc/apt/keyring” directory.

3. Add the official repository

Next, run the command below to create a source file and edit it via Gnome text editor:

sudo gnome-text-editor /etc/apt/sources.list.d/sublime-text.list

For Ubuntu 22.04 and earlier, replace gnome-text-editor with gedit. Or use mousepad for XFCE, pluma for MATE, or nano command line text editor that works in most desktop environments.

When the file opens, add the following line (it’s a single line) and save it.

deb [signed-by=/etc/apt/keyrings/sublimehq-pub.gpg] https://download.sublimetext.com/ apt/stable/

This step can be done alternatively by running the single command below in terminal:

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

4. Now, run the command below to refresh system package cache:

sudo apt update

In the output, it should print a line looks like “Get: x https://download.sublimetext.com apt/stable …

5. Finally, install the code editor from that repository by running command:

sudo apt install sublime-text

Option 3: Flatpak package

Sublime Text 4 is NOT available as Flatpak so far. But for the old version 3, you may install it by running the commands below one by one in terminal.

NOTE: Like Snap, the Sublime Text as flatpak is also un-official package maintained by contributors, runs in sandbox.

Firstly, press Ctrl+Alt+T to open terminal and run command to install Flatpak daemon:

sudo apt install flatpak

Then, install Sublime Text 3 via Flatpak by running command:

flatpak install https://dl.flathub.org/repo/appstream/com.sublimetext.three.flatpakref

Uninstall Sublime Text:

For the Snap package, remove it either using Ubuntu Software or by running command in terminal:

sudo snap remove --purge sublime-text

For the Flatpak package, use the command to uninstall the package:

flatpak uninstall --delete-data com.sublimetext.three

and cleanup useless run-times via flatpak uninstall --unused.

For the official .deb package, remove it by running command:

sudo apt remove --autoremove sublime-text

The apt repository will not display in “Software & Updates” utility, so get rid of it by running command to remove the source file:

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

And remove the key file by running command:

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

Summary:

Here I introduced 3 ways to install Sublime Text in Ubuntu. The Snap is the easiest, which is available in Ubuntu Software, but the official apt repository is recommended! For those still looking for the old Sublime Text 3, the Flatpak package is available for choice.

Sublime Text 4 was officially released a day ago. Here’s how to install it in Ubuntu 21.04, Ubuntu 20.04 via apt repository.

Sublime Text 4 (Build 4107) feature multi-select tabs. Press and hold Ctrl (or Shift), then you can select tabs to view them side by side.

And now it supports for auto-switching between dark and light themes to follow system appearance.

Other release highlights include:

  • Context-aware auto complete
  • ARM64 support for Linux and macOS (Apple Silicon)
  • Python 3.8 support for plugins
  • Built-in TypeScript, JSX and TSX support
  • GPU rendering, disabled by default in Windows and Linux.
  • Wayland support for Linux.

There are also tons of other changes, see the announcement for details.

How to Install Sublime Text 4 in Ubuntu:

Open terminal from system application menu, then run following commands one by one to install Sublime Text 4 from its official apt repository.

1.) Download and install the GPG key by running command:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Type user password when it prompts and hit Enter to continue.

Make sure https is supported by running command:

sudo apt install apt-transport-https

2.) Add the official Sublime Text repository via command:

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

3.) Finally refresh system package cache and install the text editor via commands:

sudo apt update

sudo apt install sublime-text

And you’ll receive future updates along with system updates through Software Updater (Update Manager).

How to Uninstall Sublime Text:

To remove the apt repository, launch Software & Updates and go to Other Software tab, there remove the repository line.

And to remove the Sublime Text editor, simply run command:

sudo apt remove --autoremove sublime-text

Sublime Text 3.2 was released yesterday with first-class Git integration, GTK3 port, and many other new features.

Sublime Text 3.2 release highlights:

  • First-class Git integration
  • Incremental diff functionality tracks changes to files being edited.
  • Moved to GTK3, and various high DPI fixes for Linux.
  • New theme functionality and block caret support.
  • Support for Unicode 11.0
  • Many syntax highlighting improvements to Clojure, D, Go, Lua.

How to Install Sublime Text 3.2 in Ubuntu:

The easiest way is to install the community maintained Snap package (run in sandbox).

For Ubuntu 18.04 and higher, simply open Ubuntu Software search for and install sublime-text

For Ubuntu 16.04, open terminal (Ctrl+Alt+T) and run command to install the snap:

sudo apt install snapd && sudo snap install sublime-text

Install Sublime Text 3.2 via its official apt repository:

For those who don’t prefer Snap package, do following steps to install Sublime Text from its official apt repository:

1. Open terminal either via Ctrl+Alt+T keyboard shortcut or from app launcher. When it opens, run command to add the keyring:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Type user password (no asterisk feedback) when it prompts and hit Enter.

2. Then run command to add the apt repository:

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

3. Finally install sublime-text package either via Synaptic package manager or by running command:

sudo apt update && sudo apt install sublime-text

Uninstall:

To remove the editor, run command:

sudo apt remove --autoremove sublime-text

To remove the apt repository, go to Software & Updates -> Other Software.

The community has made Sublime Text 3 into the SNAP package. So far, it’s available for testing in candidate channel.

A snap is an universal Linux application comes with all its dependencies bundled. It runs in sandbox and is isolated from other system software.

If you just want to install latest stable Sublime Text 3 in Ubuntu. There’s an official apt repository and here’s how-to tips.

Install Sublime Text 3 via Snap:

Open terminal either via Ctrl+Alt+T or by searching for ‘terminal’ from application launcher. When it opens, run command:

snap install sublime-text-3 --classic

The command works in Ubuntu 16.04 and higher. And the --candidate flag is not required anymore since the snap is now in stable.

The snap package co-exists with traditional packages, you’ll have two launcher icons:

To make sure you’re running the snap app, you can launch it from the terminal command:

/snap/bin/sublime-text-3

Uninstall:

To remove the snap app for Sublime Text 3, run command:

snap remove sublime-text-3

How to Install Sublime Text 2 / 3 in Ubuntu 14.10

Last updated: October 13, 2014

Quick tutorial to install Sublime Text 2 stable, so far its 2.0.2, or Sublime Text 3 Beta in Ubuntu 14.10 Utopic Unicorn.

Sublime Text is a close-source text and code source editor with an Python API. It may be downloaded and evaluated for free, however a license must be purchased for continued use.

For the features and supported languages, see the wikipedia page.

Sublime Text 2 in Ubuntu 14.10

Install Sublime Text in Ubuntu:

Thanks to WebUpd8 Team, an installer has been made into PPA that automatically downloads the stable or beta release of Sublime Text from its official site and installs it on your system.

Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run below commands one by one:

To install Sublime Text stable:

sudo add-apt-repository -y ppa:webupd8team/sublime-text-2

sudo apt-get update

sudo apt-get install sublime-text

When running the first command, you will be asked to type in user password and there will be no visual feed back.

To install Sublime Text 3 Beta:

sudo add-apt-repository -y ppa:webupd8team/sublime-text-3

sudo apt-get update

sudo apt-get install sublime-text-installer

Once installed, launch the editor from the Unity Dash or menu and enjoy!

This simple tutorial shows you how to install the Sublime Text 3 in Ubuntu 14.04 Trusty LTS via PPA repository.

Sublime Text is a popular text and source code editor somewhat similar to TextMate, available for Windows, Linux, Mac OS X.

The Sublime Text 3 is currently in beta. Webupd8 Team has made an installer script into PPA which automatically downloads the Sublime Text 3 archive from its website and installs it on Ubuntu. The PPA does not host any Sublime Text 3 files.

Install Sublime Text 3:

To get started, press Ctrl+Alt+T on your keyboard to open a terminal window. When it opens, copy and paste below command into terminal and hit enter:

sudo add-apt-repository -y ppa:webupd8team/sublime-text-3

Type in your password when prompts and then you’ll get this PPA (Personal Package Archive) into your system.

NOTE: you’ll see nothing when typing passwords in Linux terminal, just type in mind and hit enter to get pass.

After added the PPA, run commands to install the script:

sudo apt-get update; sudo apt-get install -y sublime-text-installer

Once installed, open the editor from Unity Dash or Menu.

To disable new version notifications, add the following to your User Preferences file (Preferences > Settings – User):

“update_check”: false

This simple tutorial will show you how to install Sublime Text 3 on Ubuntu 13.10 Saucy, 13.04 Raring, 12.10 Quantal, and 12.04 Precise from ppa repository.

Sublime Text is a popular text and source code editor. Sublime Text 3 Public Beta is now available to both registered users and the general public. The Webupd8 team created a ppa repository containing the installer for Ubuntu and Linux Mint users.

To get started, press Ctrl+Alt+T to open terminal, then follow below steps:

1.) Copy and paste this command into terminal and run to add the ppa repository:

sudo add-apt-repository ppa:webupd8team/sublime-text-3

2.) Update:

sudo apt-get update

3.) Below command will automatically download and install the latest Sublime Text 3 Beta in your system.

sudo apt-get install sublime-text-installer

Enjoy!