How to Install Visual Studio Code on Linux Mint

In this short tutorial shows how to install Microsoft Visual Studio Code on Linux Mint.

Visual Studio Code is one of top IDEs for Python. Information about top Python code editors is available here: Complete list of 10 best Python IDEs and Code editors of 2020

Visual Studio Code is an open source IDE developed by Microsoft which is available for Linux. It offers many interesting features like:

Step 1: Download and install Visual Studio Code

The easiest, best and recommended way is to install Visual Studio Code by getting the latest .deb file and install it to your Linux Mint.

Visual Studio Code is available for download here:

  • Download or save the code_1.51.1-1605051630_amd64.deb file
  • Open the downloaded .deb with GDebi Package Installer
    • by default is downloaded in ~/Downloads
  • Click Install Package in the opened window
  • Enter your password

Once the installation is complete the program can be started from:

  • Menu
  • Programming

What about updates? Installing the VS Code as .deb package will automatically install the apt repository and signing key to enable auto-updating using the system's package manager.

Step 2: Install Visual Studio Code from repository

If you prefer to add the repository and the signing key manually then you can run next commands:

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/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

After update of the packages:

sudo apt-get install apt-transport-https
sudo apt-get update

the VS Code can be installed by:

sudo apt-get install code # or code-insiders

This solution is based on: Visual Studio Code on Linux Installation

Step 3: Install Visual Studio Code via Repository

Visual Studio Code is also available in the Software Manager of Linux Mint. The package is available as a Flatpak.

In order to install VS Code from Software Manager follow:

  • Software Manager
  • Search for Visual Studio
  • Open Visual Studio Code
  • Install Package
  • Enter your password

Note: When I tried this package in the past there were problems with the terminal which was not able to recognize basic commands. Unit tests and browsers were not working as well.

All the basic code features were OK. If you go with this edition be careful if you face errors I would recommend for you to for the official .dev file - explained in the other steps.

Step 4: Uninstall Visual Studio Code

How to uninstall Visual Studio Code installed as a .deb file:

  • Menu
  • Programming
  • Find Visual Studio Code
  • right click
  • Uninstall
  • Uninstall the package