This tutorial covers two methods for install VS Code on Ubuntu, Debian, and Linux Mint systems.
How to Install VS Code on Ubuntu using Snap
The Visual Studio Code is officially distributed as a Snap package in the Snap Store. Also, most of the latest operating systems recommended using the Snap tool for the packages installation. With these instructions, you can install Visual Studio Code on Ubuntu, Debian, and Linux Mint systems along with its derivatives.
To install VS Code, Open a terminal (CTRL+ALT+T) and type:
sudo snap install code --classic
On successful completion of the above command, the VS code will be installed on your Debian-based system.
Alternatively, follow the next method to install Visual studio code.
How to Install VS Code on Ubuntu using PPA
Use the following instructions to install Visual Studio Code on Ubuntu, Debian and Linux Mint systems using Debian packages. The PPA is officially maintained by Microsoft.
Step 1. First of all, You need to enable a package repository in your system. Run the following command to enable Visual studio code repository to your system.
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
Step 2. Next, Import the package signing gpg key on your system using the following command.
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
Step 3. After importing gpg key, Let’s use the below commands to install Visual Studio Code on your Debian-based system.
sudo apt-get update sudo apt-get install code
That’s it. You have successfully installed Visual Studio code on a Linux system.
Working with Visual Studio Code
Now launch the Visual Studio Code editor on your system using the graphical menu. After that create a new file or open files and directories using the File menu.
In this tutorial, you have learned two methods for installing Visual Studio Code on a Debian-based Linux system.