Here’s how to install VS Code on Ubuntu and its related distros. For those who might be wondering what Visual Studio Code is all about, here’s a small introduction to its build features.

What Is Visual Studio Code?

Microsoft Visual Studio Code, as the name suggests, is an open-source code editor powered by Microsoft. It offers plenty of debugging options to the end-users, including embedded Git control, along with syntax highlighting, code completion, code refactoring, an integrated terminal, and snippets.

Visual Studio Code, as a platform, syncs well with Windows, macOS, and even Linux.

There are three prominent ways to install Visual Studio Code on Ubuntu. The first method is to install it from the terminal, using the snap package. The second way is to use APT along with the package repository provided by Microsoft. These repositories cater to Linux users specifically.

In the third method, you simply use the desktop’s GUI to install the software on your system. Check out this comparison if you are unable to choose between VS Code and Atom.

1. Installing the VS Code Snap Package Through the Ubuntu Terminal

The snap package for Visual Studio Code within Linux is solely maintained and updated by Microsoft. This way, you can always be sure of getting the best quality software for yourself.

As a prerequisite, you need to have Snap installed on your system. For those who don’t, here’s a brief introduction to the Snap Store and how to install Snap on Linux.

To install the Visual Studio Code snap package, open the terminal and type the following command to kickstart the installation process:

This is it; once the installation is complete, you can open Visual Studio Code from the terminal or the applications menu. VS Code ships with a host of features, and real-time code collaboration is one of the best.

2. Installing VS Code Using APT on Ubuntu

Alternatively, you can install Visual Studio Code using Microsoft’s repository and the default package manager on Ubuntu, which is APT.

First of all, update all the packages on your system using the following commands:

Power users can also issue this code in one single line:

Once you have updated and upgraded the packages, it is time to install the necessary dependencies for adding the repository. Type the following command in your terminal:

Then, use wget to import Microsoft’s GPG key:

To enable the VS Code repository, issue the following command:

As soon as the repository is enabled, all you have to do is install the software package using:

To update your existing VS Code version to the newest available version, run the update/upgrade commands in this manner:

This will recognize the newest versions available and update your existing version as per the latest release. To get the best out of VS Code after it’s installed, check out these essential productivity tips for Visual Studio Code.

3. Installing Visual Studio Code Using the GUI

You can also install Microsoft Visual Studio Code from your desktop’s GUI. If you are not a fan of the terminal, using the desktop environment for installing the package is your next best option.

To install Visual Studio Code, launch the Ubuntu Software app from the applications menu. Search for Code and select the first result. Then, click on Install.

Once the installation is complete, you can open Visual Studio Code from the terminal or directly from the applications menu.

Using VS Code for the First Time

Post-installation, as soon as you open VS Code on your Ubuntu machine, you would be greeted with the following screen:

If everything looks in order, you can install the extensions and configure the editor as per your preferences. Here are some great Visual Studio Code extensions to boost your efficiency.

Writing Code With Visual Studio Code in Ubuntu

Now you know how to install Visual Studio Code on Ubuntu, and, as you’ve seen, it is a rather simple process. Given the various ways of installing packages, you can pick and choose a process at your convenience so that you can download the software and use it whenever you want.

Visual Studio Code isn’t the only code editor available to you as a Linux user. You can test other editors and find which one suits you the best.