How to install Sublime Text editor on Ubuntu 20.04 Focal Fossa Linux

The objective of this tutorial is to install the Sublime Text editor on Ubuntu 20.04 Focal Fossa Linux.

In this tutorial you will learn:

  • How to install Sublime Text editor from the official sublime text repository
  • How to install Sublime Text editor from the Ubuntu snap repository
  • How to start Sublime Text editor

Sublime Text Editor on Ubuntu 20.04

Sublime Text Editor on Ubuntu 20.04

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
Software sublime-text
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to install Sublime Text editor on Ubuntu 20.04 step by step instructions

  1. The first, easiest and recommend method is to install sublime text editor from Ubuntu snap repository. Execute the bellow command to install the Sublime text editor on your Ubuntu 20.04 system:
    $ sudo snap install sublime-text --classic
    

    To upgrade Sublime text editor execute:

    $ sudo snap install sublime-text 
    


  2. The second Sublime text editor installation method on Ubuntu 20.04 is to install packages directly from Sublime Text official repositories. To do so execute the bellow commands:
    $ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
    $ sudo apt-add-repository "deb https://download.sublimetext.com/ apt/stable/"
    

    The above will add sublime text repositories into the system. Once ready simply use the apt command to install Sublime text editor:

    $ sudo apt install sublime-text
    

    In case you later on need to upgrade the editor to the latest version simply re-execute the above command.