Welcome to our guide on how to install Visual Studio Code (vscode) on CentOS 8 / RHEL 8. Visual Studio Code is a popular source-code editor originally developed by Microsoft for Windows, but can now be installed on Linux and macOS. It is redefined and optimized for building and debugging modern web and cloud applications.
For RHEL/CentOS Linux distributions, the Visual Studio Code package is available on an RPM repository maintained by Microsoft.
Step 1: Import Microsoft GPG key
Step 1 is to import the GPG key used for signing the packages.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
Once this is done, proceed to step 2.
Step 2: Add VS Code repository
Once the GPG key is added, continue to add the VS Code repository.
sudo tee /etc/yum.repos.d/vscode.repo <<ADDREPO
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
ADDREPO
Step 3: Install Visual Studio Code
We’re now ready to install Visual Studio Code on CentOS 8 / RHEL 8. All you need to do is run the following command on your terminal.
sudo dnf install code
When prompted to Agree to installation, press “y“.
................
Transaction Summary
================================================================================
Install 1 Package
Total download size: 66 M
Installed size: 189 M
Is this ok [y/N]: y
Downloading Packages:
See all the information regarding installed package.
$ rpm -qi code
Name : code
Version : 1.84.2
Release : 1699528436.el7
Architecture: x86_64
Install Date: Sun 26 Nov 2023 08:53:09 PM UTC
Group : Development/Tools
Size : 384027215
License : Multiple, see https://code.visualstudio.com/license
Signature : RSA/SHA256, Thu 09 Nov 2023 11:19:39 AM UTC, Key ID eb3e94adbe1229cf
Source RPM : code-1.84.2-1699528436.el7.src.rpm
Build Date : Thu 09 Nov 2023 11:14:12 AM UTC
Build Host : 6439e96ac000000.td2yyyqvq1meteylsib3esfcca.cx.internal.cloudapp.net
Relocations : (not relocatable)
Packager : Visual Studio Code Team <[email protected]>
Vendor : Microsoft Corporation
URL : https://code.visualstudio.com/
....
Step 4: Launch Visual Studio Code
After installing any package, you’ll definitely want to use it. To launch Visual Studio Code on CentOS 8 / RHEL 8, you can use CLI
$ code
or Gnome Activities search function.

You should see the VS Code welcome window.

Enjoy your development with Visual Studio Code on Fedora. Check a comprehensive guide on how to use VS Code. Watching Introductory Videos should also help you get started.
Similar Articles:
- How to Install Skype on CentOS 8 / RHEL 8
- How to Install Slack on CentOS 8 / RHEL 8
- How to Install Sublime Text 3 on CentOS 8 / RHEL 8
- Install Atom Text Editor on RHEL 8 / CentOS 8