How to install Visual Studio code on Ubuntu 20.04

s2 0

Visual Studio Code
is a powerful open source code editor developed by Microsoft. It has built-in debugging support, embedded Git control, syntax highlighting, code completion, built-in terminal, code refactoring, and snippets.

Visual Studio Code is cross-platform and available for Windows, Linux, and macOS.

This guide shows two ways to install Visual Studio Code on Ubuntu 20.04. VS Code can be delivered as a snap package via the Snapcraft shop
or as a deb package from Microsoft repositories.

Choose the installation method that works best for your environment.

Install Visual Studio Code as a snap package

The Visual Studio Code snap package is distributed and maintained by Microsoft.

Snaps are self-contained software packages that contain the binary file with all of the dependencies necessary to run the application. Snap packages are easy to update and secure. In contrast to the standard Deb packages, Snaps have a larger memory footprint and a longer application start time.

Snap packages can be installed either from the command line or from the Ubuntu software application.

To install the VS Code snap, open your Terminal (Ctrl+Alt+T) and run the following command:

sudo snap install --classic code

That’s it. Visual Studio Code has been installed on your Ubuntu computer.

If you’d prefer to use a GUI, open the Ubuntu software, search for “Visual Studio Code” and install the application:

Whenever a new version is released, the Visual Studio Code package is automatically updated in the background.

Install Visual Studio Code with apt

Visual Studio Code is available in the official Microsoft Apt repositories. To install it, do the following:

  1. Update the package index and install the dependencies by running the following command as a user with sudo privileges:

    sudo apt updatesudo apt install software-properties-common apt-transport-https wget
  2. Import the Microsoft GPG key as follows: wget Command:

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

    And enable the Visual Studio Code repository by typing:

    sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
  3. Once the apt repository is enabled, install the Visual Studio Code package:

    sudo apt install code

When a new version is released, you can update the Visual Studio Code package through your standard desktop software update tool or by running the following commands in your terminal:

sudo apt updatesudo apt upgrade

Start Visual Studio Code

Enter “Visual Studio Code” in the activity search bar and click the icon to launch the application.

The first time you start VS Code you should see a window like the following:

You are now ready to begin installing extensions and configuring VS Code the way you want.

VS Code can also be started from the command line by typing code.

diploma

We explained how to install VS Code on Ubuntu 20.04.

You can now start installing new extensions and customizing your workspace. To learn more about VS Code, visit the official one documentation
Page.

If you have any questions please leave a comment below.