How to Install Visual Studio Code in Linux

Visual Studio Code (VS Code) is widely used source code editor and it’s an open-source & lightweight application created by Microsoft which runs on Windows, macOS and Linux system efficiently. It is intentionally designed to be lightweight, fast, and exceedingly customizable, rendering it’s suitable for an array of programming and scripting languages. With its extensive support for features and extensions, VS Code proves to be a versatile and invaluable tool for software development tasks.

Download Visual Studio Code

Click here to download Visual Studio Code Package for Linux, Windows & MacOS.

i) Installed Linux System
ii) Sudo Privileges
iii) Internet to download packages

  1. Also Read : How To Install Fedora Linux 38 Workstation
  2. Also Read : Ubuntu 23.04 Code Name Lunar Lobster Installation Steps

Install Visual Studio Code in Ubuntu & Debian based Linux using APT Package Manager

In Debian/Ubuntu based distributions download and install .deb package either through GUI or command line. Enable the VS Code repository and install the Visual Studio Code using APT package manager.

Install Dependencies Packages

  • $ sudo apt-get install wget gpg

 Add GPG Key

  • $ wget -qO- | gpg –dearmor >
  • $ sudo install -D -o root -g root -m 644 /etc/apt/keyrings/

Add Repository

  • $ sudo sh -c ‘echo “deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/] stable main” > /etc/apt/sources.list.d/vscode.list’

After enabling the repository, update the system and install package with using following commands:

Install Package Dependencies

  • $ sudo apt install apt-transport-https

Update the System

  • $ sudo apt update

Install VS Code

  • $ sudo apt install code 

How to Install Visual Studio Code in Fedora, Red Hat, CentOS AlmaLinux & Rocky Linux

Following are the steps to install Visual Studio Code in rpm based Linux System. Import Microsoft’s GPG key using rpm command as below:

Import Microsoft’s GPG key

  • $ sudo rpm –import

Create vscode.repo file with vim command

  • $ sudo vim /etc/yum.repos.d/vscode.repo

Append the following code, save the file and exit to install Visual Studio Code

name=Visual Studio Code

Update the system and install Visual Studio Code package using dnf command below

  • $ dnf check-update
  • $ sudo dnf install code

How to Start VS Code on Linux

Using command line:

Launch terminal or command prompt and type ‘code‘, which will start the Visual Studio Code.

  • $ code

Using GUI:

Click on “Activities” which will present the following window and search visual studio code to launch as shown below.

Uninstall VS Code from the System

If you want to remove VS Code from the system, follow the steps below.

  • $ sudo apt remove code [Ubuntu based system]
  • $ sudo dnf remove code [RPM based system]

Conclusion !

This post showed you how to install and uninstall VS Code in Linux. Kindly share it and let’s know if you have any query through comment box below. Also follow us on Facebook Official Page.

Leave a Comment