Visual Studio Code is a lightweight but powerful code editor with plugin support for just about any programming language you can think of. This article will show how to install Visual Studio Code on CentOS, RHEL, Fedora, and any other systems derived from them.

Enable the yum repository for Visual Studio Code

Using your favourite editor, in my case vim

vim /etc/yum.repos.d/vscode.repo

and add the following content:

[vscode]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

Now as root install Visual Studio Code

But first import microsoft signing key

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

Finally do the install

## CentOS and RHEL system
sudo yum check-update
sudo yum install code

## Fedora systems:
sudo dnf install code

Launch Visual Studio Code

Now that visual studio code is installed, we can go ahead and start using it.

The vscode welcome screen.