How to Install Visual Studio Code in Ubuntu

If you are a programmer, you might already be familiar with Visual Studio Code. The Visual Studio code is ideal for developers and programmers alike, who want to configure and run several programming languages from a single IDE.

The Visual Studio IDE is a creative launching pad that you can use to edit, debug, and build code, and then publish an app. An integrated development environment (IDE) is a feature-rich program that is created and managed by Microsoft. Like Visual Studio Code, there are few other IDEs that offer the same features and coding facilities for developers. You can check out the Top 10 Integrated Development Environments (IDE) for Programming.

Installing VS Code using Snap Package

Microsoft maintains and updates the snap package for Visual Studio Code within Linux. Snap packages can be installed from either the command line or via 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 all you need to do to get Visual Studio Code installed on your system. It will take some time to download and install it. On successful installation, it will show output similar to this:

root@ubuntu:~$ sudo snap install code --classic
[sudo] password for root: 
code ee2bst21 from Visual Studio Code (vscode**) installed

Installing VS Code Using APT

The alternative of snap is APT package manager. First, update all the packages on your system and install the necessary dependencies for adding the repository. Type the following command in your terminal:

sudo apt update
sudo apt install software-properties-common apt-transport-https wget -y

After completing the above execution we need to Import the Microsoft GPG key and enable the Visual Studio Code repository. For that enter the below commands one by one:

wget -q -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] stable main"

Once it is completed, we can start the installation of the Visual Studio Code package by entering the below command in the terminal:

sudo apt install code


To run, In the Activities search bar type “Visual Studio Code” and click on the icon to launch the application.

We’ve explained how to install VS Code on Ubuntu using APT and Snap. Now you can start using VS code and installing extensions and customizing appearance.