How to Install Microsoft Visual Studio Code on Ubuntu 20.04

Channel: Linux
Abstract: An instance of Ubuntu 20.04 with GUI A sudo user configured Install Visual Studio Code using a snap package Visual Studio Code is officially available

Developed and maintained by Microsoft, Visual Studio Code is a free and cross-platform IDE that allows users to develop websites, web applications, and software. It is mainly used for debugging, task running and version control.

It provides a stunning UI with cool features such as code completion, syntax highlighting, code refactoring, and tons of plugins. Microsoft Visual Studio can be installed on Windows, Mac, and Linux environments.

There are two ways to install Visual Studio Code: install using the Official Microsoft repositories using APT package manager or simply via snap packages. In this tutorial, we will show how to install Visual Studio Code on Ubuntu 20.04.

How To Download & Install Visual St...

To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

How To Download & Install Visual Studio on Windows 10 Prerequisites

Before you start out, ensure that you have the following:

  1. An instance of Ubuntu 20.04 with GUI
  2. A sudo user configured
Install Visual Studio Code using a snap package

Visual Studio Code is officially available as a snap package. A snap package is a containerized package that contains the application's code and all the dependencies required to run the application. Snap packages are easier to a upgrade and maintain. Snap program will automatically updating VS Code in the background. However, they occupy significantly large disk space.

To install the Visual Studio snap package, run the following command from terminal:

$ sudo snap install --classic code

The command will take a while, so just be patient. As at the moment, the latest stable version of Microsoft Visual Studio Code is version 1.57.1

Install Visual Studio from Microsoft repositories

Visual Studio Code is available from Microsoft's APT repositories. Before adding the repository to your system, first update the package lists on your system as follows.

$ sudo apt update

Next, install the prerequisites required during the installation:

$ sudo apt install software-properties-common apt-transport-https wget

Using the wget command, import the Microsoft GPG:

$ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

You should get the output 'OK' .

Thereafter, add the Visual Code Studio repository as provided in the command below. This will also update the package index to sync with the new repository.

$ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

Finally, install Visual Studio code by running the command:

$ sudo apt install code

Noticed both method installed the same version of Visual studio code, may be not the case every time.

Launching Visual Code Studio

Once Visual Code Studio is installed, you can launch it using the application manager as demonstrated below.

Launch Visual Studio Code

When you click the icon, the Visual Studio Code interface is launched as shown. Choose your favorite theme and you are good to go!

Microsoft Visual Studio Code Interface Wrapping up

Microsoft Visual Studio Code is arguably one of the most feature-rich and intuitive code editors out there that makes coding a breeze. If you are a beginner, or even a seasoned user, you might consider giving it a test run. In this tutorial, we have demonstrated how to install Visual Studio Code on Ubuntu 20.04.

Ref From: linoxide
Channels:

Related articles