Install Visual Studio Code in Ubuntu 20.04 LTS

The Visual Studio Code is written in CSS, JavaScript & TypeScript. To begin with, it is developed by Microsoft. It was first released on April 29, 2015. Moreover, at the time of writing the article, the latest stable release is 1.44.2. In this article, we would discuss how to install Visual Studio Code in Ubuntu 20.04 LTS release.

Visual Studio code primarily functions as a source code editor. Besides, we can get more out it by installing relevant extensions from its Marketplace. In addition to, it also acts as a debugger for TypeScript, JavaScript & languages transpiled from JavaScript. We can get support for more programming languages by installing relevant extensions. It is worth mentioning here that, it supports Node.js runtime debugging out of the box.

There are two methods through which we can install Visual Studio Code or VSCode –

  1. .deb package and,
  2. snap store.

We would discuss each of these next.

Note: Following operations require you to have superuser privileges. In case you don’t have one, then contact your System Administrator for assistance.

Install Visual Studio Code in Ubuntu 20.04 LTS

Method I. Visit official Visual Studio Code website. Therein, on the home page click on .deb Debian, Ubuntu link. It will download the required package – code_1.44.2-1587059832_amd64.deb. It is of approximately 60 MBs in size.

Now, we will install the downloaded package through dpkg (debians’ package manager). Therefore, issue the following in terminal –

cd /path/to/package/
sudo dpkg -i code_1.44.2-1587059832_amd64.deb

where,

-i –> installs the package file

Consequently, we can access the package through our Systems’ main menu.

If, for some reason, we want to remove the package, then

sudo dpkg -r code

will suffice. where, -r –> removes the package.

Alternately, we can choose to install the package through snap.

Method II. Although snap is installed as default, but for some reason its not there in your Ubuntu distribution, then –

sudo apt install snapd

Next, to install Visual Studio Code –

sudo snap install --classic code

This will download & install the package and related dependencies, if any.

In conclusion, we have discussed how to install Visual Studio Code in Ubuntu 20.04 LTS release through .deb package and snap.

Additional Info –

If you get dependency related issues while installing the package through dpkg. Then, update standard repository of Ubuntu first –

sudo apt update

Thereafter, make apt install the missing/related dependencies –

sudo apt install -f

where,

-f –> to fix broken dependencies related issues.