Visual Studio Code is a popular code editor which is lightweight and cross platform application. It is available for macOS, windows and Linux. In this article, We will see about how to install visual studio code on ubuntu 20.04.
This guide shows two ways of installing Visual Studio Code on Ubuntu 20.04.
Install Visual Studio Code on ubuntu 20.04
1. Installing Visual Studio Code as a Snap Package
Visual Studio Code snap package is distributed and maintained by Microsoft.
To install the VS Code snap, open your terminal
(Ctrl+Alt+T) and run the following command:
sudo snap install --classic code
2. Installing Visual Studio Code with apt
Visual Studio Code is available from the official Microsoft Apt repositories. To install it, follow the steps below.
First, Update the packages index and install the dependencies by running the following command as a user with sudo privileges :
$ sudo apt update $ sudo apt install software-properties-common apt-transport-https wget
Import the Microsoft GPG key using the following wget command and And enable the Visual Studio Code repository by typing:
$ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - $ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
Once the apt repository is enabled , install the Visual Studio Code package:
$ sudo apt install code
Install Visual Studio Code using Manual method
In this method, we are going to download the package from official website and install using apt.
Download visual studio code from official site.
Once downloaded you can go to the downloaded location and type the below command to install.
$ sudo apt install ./code_1.47.3-1595520028_amd64.deb
Visual Studio Code will be installed on your device. It can be viewed in applications. Open it:
That is it. Feel free to let me know your thoughts in the comments down below.