Cyberithub

How to Install Sublime Text 4 on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, I will take you through the steps to install sublime text 4 on Ubuntu 20.04 LTS (Focal Fossa). Sublime Text 4 is the latest version of Sublime Text available now. It is a free and open source text editor with multiple features packed into it. Sublime is not just a text editor but also an integrated code editor with support of multiple programming languages like C++, Python, Java etc.

The auto completion feature of this tool makes it a unique text editor. It is chosen by many of the programmers to design and develop the application across the world. It is available to be installed in multiple digital platforms such as Windows, Linux and Mac. Here we will see the steps to install Sublime Text 4 on Ubuntu 20.04 LTS based systems.

 

Important Features

  • Utilizes the GPU of Linux, Windows and Mac to render the interface
  • Dark mode available
  • Split panes with easy navigation
  • Very fast
  • Code Completion
  • Support available for most of the programming languages
  • Adaptive theme with customize title bars
  • Syntax highlighting feature available
  • Side by Side for definitions

 

How to Install Sublime Text 4 on Ubuntu 20.04 LTS (Focal Fossa)

How to Install Sublime Text 4 on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Remove PPA Repository from Ubuntu/Debian Linux 

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 LTS Server.

b) You should have sudo or root access to run privileged commands.

c) You should have wget or apt or apt-get utility available in your Server.

 

Step 2: Update Your Server

It is always recommended to first install all the available updates from Ubuntu repo by using sudo apt update command and upgrade the packages to the latest version by using sudo apt upgrade command as shown below.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libfwupdplugin1 libllvm11 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

 

Step 3: Install GPG Key

Next, you need to visit the official download page and get the latest step to download the GPG Key using wget command as shown below.

cyberithub@ubuntu:~$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null
[sudo] password for cyberithub:

 

Step 4: Add Repo

After adding the GPG key, you need to add the Sublime Text repo to download and install the stable package by using below command.

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

 

Step 5: Update Package Cache

After adding the repo, you need to update the package cache to reflect the changes done by using sudo apt update command as shown below.

cyberithub@ubuntu:~$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:7 https://download.sublimetext.com apt/stable/ InRelease [2,536 B]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:9 https://download.sublimetext.com apt/stable/ Packages [6,373 B]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [788 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [94.2 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,384 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [275 kB]
Get:16 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [408 kB]
Get:17 http://in.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:18 http://in.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,956 B]
Get:19 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
Reading package lists... Done

 

Step 6: Install Sublime Text 4

In the next step, you can install Sublime Text 4 from the added repo by using sudo apt-get install sublime-text command as shown below. This will download and install the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt-get install sublime-text
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libfwupdplugin1 libllvm11 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
sublime-text
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.6 MB of archives.
After this operation, 52.3 MB of additional disk space will be used.
Get:1 https://download.sublimetext.com apt/stable/ sublime-text 4143 [16.6 MB]
Fetched 16.6 MB in 12s (1,407 kB/s)
Selecting previously unselected package sublime-text.
(Reading database ... 184521 files and directories currently installed.)
Preparing to unpack .../sublime-text_4143_amd64.deb ...
Unpacking sublime-text (4143) ...
Setting up sublime-text (4143) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...

 

Step 7: Verify Installation

After successful installation, you can check the installed files path by using dpkg -L sublime-text command as shown below.

cyberithub@ubuntu:~$ dpkg -L sublime-text
/.
/opt
/opt/sublime_text
/opt/sublime_text/Icon
/opt/sublime_text/Icon/128x128
/opt/sublime_text/Icon/128x128/sublime-text.png
/opt/sublime_text/Icon/16x16
/opt/sublime_text/Icon/16x16/sublime-text.png
/opt/sublime_text/Icon/256x256
/opt/sublime_text/Icon/256x256/sublime-text.png
/opt/sublime_text/Icon/32x32
/opt/sublime_text/Icon/32x32/sublime-text.png
/opt/sublime_text/Icon/48x48
/opt/sublime_text/Icon/48x48/sublime-text.png
/opt/sublime_text/Lib
/opt/sublime_text/Lib/python3
.....................................

 

Step 8: Check Version

You can check the installed version by using subl --version command as shown below.

cyberithub@ubuntu:~$ subl --version
Sublime Text Build 4143

 

Step 9: Launch Sublime Text 4

To launch the text editor, you need to go to Desktop and click on Activities. Then you need to type sublime text in the search bar as shown below. Once the application shows up, click on it to open.

How to Install Sublime Text 4 on Ubuntu 20.04 LTS (Focal Fossa) 2

When you open it for the first time, it should show like below.

How to Install Sublime Text 4 on Ubuntu 20.04 LTS (Focal Fossa) 3

 

Step 10: Uninstall Sublime Text 4

Once you are done using sublime text, you can choose to uninstall it from your system by using sudo apt-get remove sublime-text command as shown below.

cyberithub@ubuntu:~$ sudo apt-get remove sublime-text
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libfwupdplugin1 libllvm11 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
sublime-text
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 52.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 184621 files and directories currently installed.)
Removing sublime-text (4143) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...

Leave a Comment