Visual Studio Code is the 21st century code editor that provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools. VSCode is free and built on open source for Windows, Linux and macOS. In this tutorial I’ll show you how you can install Visual Studio Code (VSCode) on Linux Mint 20.

VS Code comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). You can easily install extensions to add new languages, themes, debuggers, and to connect to additional services

Install Visual Studio Code on Linux Mint 20

A debian installation package is provided for use on Debian based systems – Debian, Ubuntu, Linux mint, Kali Linux e.t.c. You can check the latest packages from the VS Code Downloads page. If you want to use wget command line to pull the .deb package directly, install it like below.

Install wget if not present.

sudo apt update
sudo apt -y install wget

We’ll instead use the Microsoft APT repository to install Visual Studio Code on Linux Mint 20.

Step 1: Add Visual Studio Code repository and key

The APT repository key is required for validation of signed packages to be installed. Add the key to the system using the commands below.

sudo apt update
sudo apt install apt-transport-https
curl | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/

Step 2: Add APT repository to Linux Mint

With the APT repository key imported to the system proceed to add the repository contents.

sudo sh -c 'echo "deb [arch=amd64] stable main" > /etc/apt/sources.list.d/vscode.list'

The contents are written to the file /etc/apt/sources.list.d/vscode.list.

$ cat  /etc/apt/sources.list.d/vscode.list
deb [arch=amd64] stable main

Step 3: Visual Studio Code on Linux Mint 20

Run the apt update command to update packages list.

sudo apt update

Then install Visual Studio Code on Linux Mint 20.

sudo apt install code

The installation process is ussually quick, only few seconds or minutes for poor internet connection.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 58 not upgraded.
Need to get 62.6 MB of archives.
After this operation, 271 MB of additional disk space will be used.
Get:1 stable/main amd64 code amd64 1.46.1-1592428892 [62.6 MB]
Fetched 62.6 MB in 23s (2,732 kB/s)                                                                                                                   
Selecting previously unselected package code.
(Reading database ... 323362 files and directories currently installed.)
Preparing to unpack .../code_1.46.1-1592428892_amd64.deb ...
Unpacking code (1.46.1-1592428892) ...
Setting up code (1.46.1-1592428892) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24+linuxmint1) ...

Step 3: Launch Visual Studio Code on Linux Mint 20

You can launch Visual Studio Code on Linux Mint 20 from the command line or Desktop Launcher.

$ code

The application window should be shown to you and customizations can be started.

What next?

  • Getting started – Initial setup of Visual Studio Code after installation.
  • Keyboard Shortcuts – Customize your own shortcuts, download a reference sheet, or install a Keymap extension.
  • Keybinding extensions – Install a Keymap extension to bring the keybindings from your previous editor to VS Code.
  • User Interface – View the documentation for VS Code.
  • Setup Overview – Documentation for getting up and running with VS Code, including platform specific setup.