Install Sublime Text 3 in Ubuntu 16.04 & Higher The Official Way

sublime-text-logo

The popular cross-platform Sublime Text editor finally offers official Linux apt repository to make it easy to install and receive update in Ubuntu.

Sublime Text is a proprietary source code editor with a Python API. It supports many programming languages and markup languages, and its functionality can be extended by users with plugins.

It’s available to download and use for free, but you’re supposed to buy a license if you plan on using it full-time.

Install Sublime Text 3 via the official apt repository:

1. Open terminal via Ctrl+Alt+T or by searching for “Terminal” from desktop app launcher. When it opens, run command to install the key:

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

sublimetext-apt-key

2. Then add the apt repository via command:

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

sublime text apt repository

3. Finally check updates and install sublime-text via your system package manager:

install-sublime-text

or by running commands:

sudo apt-get update

sudo apt-get install sublime-text

Once installed, launch it from your desktop app launcher and enjoy!

Uninstall:

To uninstall the editor, either use your system package manager or simply run command:

sudo apt-get remove sublime-text && sudo apt-get autoremove

And the official Sublime Text apt repository can be removed by going to System Settings -> Software & Updates -> Other Software tab.

About ml

ml is a part time stay-at-home dad who've been using Ubuntu Desktop for a few years. He writes in the free time and wishes to share some useful tips with Ubuntu beginners and lovers.
  • Abdulwahab Opeyemi Nasir

    thanks for the post

  • Bu Ang

    Many thanks for the initiative!

  • Benjamin Wekesa

    Genius it worked perfectly well for my ubuntu 16!
    Thanks very much

  • Bhabani Mohapatra

    Nice article. Works exactly as it is.

  • Sjkumar India

    is this to install sublime text 2 or sublime text 3, please clarify

  • Gilto Barcella

    Very nice article! Thank you so much!

  • Tom Lepski

    Very Nice one

  • Nasir Ali Joiya

    yes! its works….i’m trying for many hours but its nice …..u solved my problem.
    thanks

  • renju kr

    worked perfectly thank you for the information

  • Lucas Andrade

    Thank you. Really Help me

  • Vinod Pattar

    It did the job 🙂 Thank you!

  • Lifelink

    Worked. Thanks!!

  • Jerome

    Recommend.

  • Andrew Siegele

    Thanks! Ubuntu noob here, and it worked perfectly.

  • Namita Subbaramappa

    crisp and precise… works well

  • Roger Tillman

    when i tried it, it did not work.. came back with an error
    “E: Failed to fetch cdrom://Xubuntu 16.04.2 LTS _Xenial Xerus_ – Release amd64 (20170215)/dists/xenial/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    “. I did not realize I had to have my Xubuntu 16.04.2 LTS _Xenial Xerus_CD in the drive for it to work.. now I am up and running..
    thank you..

  • Apeksha saxena

    nice article, worked. Thanks.

  • Aditya Sulistyo

    nice , its helpfull

  • Basil Nasrallah

    Perfect .

  • aminelch

    how can i add sublime text to luncher ?

  • Jitendra Sikarwar

    Very Helpful in first attempt itself. Thanks.

  • Purval Patel

    thanks it works.

  • Jayadhar Gj

    Worked . Thanks!