Visual Studio Code is an open-source, cross-platform powerful code editor that is developed by Microsoft. It offers different useful features to the developers. It provides a trouble-free method to manage and write the source code.
VS code is a streamlined Code Editor that gives you various options such as syntax highlighting, debugging, version control, code completion, etc. using this application, users can easily generate, insert and collapse code blocks for better code understanding.
We will explain all possible methods in this article through which you can install Visual Studio Code editor on Ubuntu 20.04 system.
Root privileges are required to install the Visual Studio code on Ubuntu 20.04 system.
Method # 01: Install Visual Studio code through the graphical interface on Ubuntu 20.04
Most Linux users prefer to install any software application on your system using a graphical environment. So, in this case click on the Ubuntu Software icon and search for ‘Visual Studio code’ in the displaying search bar. The following window will show on the system:
Click on the ‘Install’ button to install the visual studio code application on your Ubuntu 20.04 system.
It will take time for complete installation. Once the installation is completed, you can verify from the application menu as follows:
You can also uninstall this application from your system by clicking on the ‘uninstall’ oe remove button.
The best thing about this application is, it automatically updates all packages when a new version releases.
Method # 02: Install Visual Studio Code using apt
Visual studio code can install directly from the official Microsoft apt repository. Please perform all steps, which are given below to install Visual studio code on Ubuntu 20.04 system:
Step 1: Install dependencies
First, update the apt packages list and type the following command to install all required dependencies:
$ sudo apt update
$ sudo apt install software-properties-common apt-transport-https wget
Step 2: Import Microsoft GPG key
In this step, use the following command to import the Microsoft GPG key using the ‘wget’ command on your Ubuntu system:
$ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
Step 3: Enable VS code repository
Type the following command to enable the visual studio code repository on your Ubuntu 20.04 system:
$ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
Step 4: Install Visual Studio code
Once the VS code repository is enabled, install the visual studio code by typing the following command on Ubuntu 20.04 system:
$ sudo apt install code
Method # 03: Install Visual Studio code using snap
This method will explain how you can download and install the visual studio code by using the snap that includes all binary dependencies required to run a software application. To install visual studio code through snap execute the below-mentioned command on the terminal:
$ sudo snap install --classic code
Uninstall Visual Studio Code from Ubuntu 20.04
To uninstall the Microsoft visual studio code from your Ubuntu system, type the following command:
$ sudo apt remove code
If the visual studio code application is installed on your system using snap then, type the following command:
$ sudo snap remove code
By following the above-mentioned steps, you can easily install Visual Studio code on your Ubuntu 20.04 system. We have elaborated three different ways to install this application on your system. Follow one from the all above methods based on your needs. Ping me through comment in case of any issue related to this article.