How to Install Visual Studio Code on Linux

Developed by Microsoft, Visual Studio Code is a free and open-source, cross-platform IDE or code editor that enables developers to develop applications and write code using a myriad of programming languages such as C, C++, Python, Go and Java to mention a few.

In this guide, we will walk you through the installation of the Visual Studio Code on Linux. To be more specific, you will learn how to install the Visual Studio Code on both Debian-based and RedHat-based Linux distributions.

How to Install Visual Studio Code on Debian, Ubuntu and Linux Mint

The most preferred method of installing Visual Code Studio on Debian based systems is by enabling the VS code repository and installing the Visual Studio Code package using the apt package manager.

$ sudo apt update

Once updated, proceed and install dependencies required by executing.

$ sudo apt install software-properties-common apt-transport-https

Next, using the wget command, import Microsoft’s GPG key as shown:

$ sudo wget -q -O- | sudo apt-key add -

With the addition of Microsoft’s GPG key, enable Visual Studio Code’s repository by running the command:

$ sudo add-apt-repository "deb [arch=amd64] stable main"

Once you’ve enabled the repository, update the system and install Visual Studio Code by running the command:

$ sudo apt update
$ sudo apt install code

Due to its size, the installation takes approximately 5 minutes. Once installed, use the application manager to search Visual Code Studio and launch it as shown.

Install Visual Studio Code in Ubuntu

Install Visual Studio Code in Ubuntu

How to Install Visual Studio Code on CentOS, RHEL, and Fedora

The procedure of installing Visual Studio Code on RedHat based distributions is pretty much like Ubuntu. Right off the bat, launch your terminal and update your system:

$ sudo dnf update

Next, import Microsoft’s GPG key using the rpm command below:

$ sudo rpm --import

With Microsoft’s GPG key in place, proceed and create the repository file for Visual Studio Code:

$ sudo vim /etc/yum.repos.d/vstudio_code.repo

Next, append the code below and save the file:

name=Visual Studio Code

To install Visual Studio code, run the command:

$ sudo dnf install code

To use it, use the Application manager to search the Visual Studio Code and launch it, you will get a window as shown below.

Install Visual Studio Code in CentOS

Install Visual Studio Code in CentOS

You can now proceed and start writing your code and installing your preferred extensions.


Visual Studio Code is a powerful and feature-rich code editor that allows you to develop applications in a diverse array of programming languages. It’s especially popular with Python and C programmers. In this topic, we walked you through the installation of the Visual Studio Code on Linux.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

James Kiarie

This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

2 Responses

  1. James Kiarie says:

    Hey Jalal, thanks for the feedback. I’m glad the tutorial was of much help to you.

  2. Jalal says:

    Thanks a lot.
    very useful for me

Leave a Reply to Jalal Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.