How to Install Visual Studio Code on Linux Mint in 5 Easy Steps

How to Install VS Code on Linux Mint in 5 Easy Steps

Effortlessly install VS Code on Linux Mint with our step-by-step guide. So, follow along and have it running in no time.

Visual Studio Code (VS Code) is a popular code editor developed by Microsoft that is available on multiple platforms, including Linux. It is highly customizable and has a wide range of features, making it an excellent choice for developers. Its key features include syntax highlighting, built-in debugging support, embedded Git control, code completion, an integrated terminal, snippets, and code refactoring.

This guide will walk you through installing Visual Studio Code on Linux Mint from the official Microsoft VS Code repository. So, whether you’re a beginner or an experienced user, these instructions will help you get up and running with VS Code on your Linux Mint system in no time.

Install Visual Studio Code on Linux Mint

1. Install Prerequisites

Before we begin the installation, we must first install some packages that will be required to be available on our Linux Mint system for the next steps. To accomplish this, open the command prompt and type:

sudo apt install software-properties-common apt-transport-https wget gpg
Install prerequisites
Install prerequisites

2. Import Microsoft’s GPG Key

To ensure that the packages we receive to install the Visual Studio Code are genuine, we should download and import the Microsoft signed GPG keys on your Linux Mint system.

To do so, type the following commands:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg

The commands will produce no output.

3. Add Microsoft’s Visual Studio Code Repository

After importing the GPG keys, you must add the official Microsoft Visual Studio Code repository to your Linux Mint system. This implies that the update package will be made available with the rest of our system’s regular updates if a new version is released.

To accomplish it, type the command shown below.

sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
Add Microsoft’s VS Code repository
Add Microsoft’s VS Code repository

As you can see, the command will not produce any output.

4. Run System Update

Before installing VS Code on your Linux Mint system, you should update the packages list. So, run the below command to update the APT repositories index.

sudo apt update
Updating the repositories index
Updating the repositories index

As you can see, your new Microsoft Visual Studio Code repository is now available and ready to be used.

5. Install VS Code on Linux Mint

Everything is already prepared for the actual installation. Now, to install VS Code on your Mint system, run the following commands:

sudo apt install code
Installing VS Code on Linux Mint
Installing VS Code on Linux Mint

That’s all! You can start using VS Code by launching it from the “Start Menu,” “Programming,” and picking “Visual Studio Code.”

Run Visual Studio Code on Linux Mint
Run VS Code on Linux Mint

When you start VS Code for the first time, a window like the following will appear:

VS Code runs on Linux Mint
VS Code runs on Linux Mint

Conclusion

Installing VS Code on Linux Mint is a straightforward process that involves adding the Microsoft GPG key, adding the official VS Code repository, and updating the local package cache. Once these steps are completed, users can easily install VS Code using the APT command. Now, you can take advantage of the powerful features and functionality offered by VS Code to enhance your coding experience.

If you have any questions, please leave them in the comments section below. To learn more about Visual Studio Code, visit its official documentation page.

Bobby Borisov
Bobby Borisov

Bobby is an Editor-in-Chief at Linuxiac. He is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, Bobby has worked as a Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *