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.
In this context, we shall look into how you can install Visual Studio Code editor on Ubuntu 20.04 system.
Different methods to Install Visual Studio Code on Ubuntu
Before proceeding with this installation procedure, ensure that Root privileges are applicable to the user to the Visual Studio code on Ubuntu 20.04 system.
1. 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.
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.
You can also uninstall this application from your system by clicking on the 'uninstall' to remove button.
The best thing about this application is, it automatically updates all packages when a new version releases.
2. 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.
i. 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
ii. 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 -
iii. 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"
iv. 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
3. 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
How to 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