Question: How to Install Visual Studio Code on Fedora 31/30/29?. This guide is a reference for the installation of the Visual Studio Code on Fedora 31/30/29. Visual Studio Code is a popular source-code editor developed by Microsoft for Windows, Linux, and macOS. It is redefined and optimized for building and debugging modern web and cloud applications.

Visual Studio Code packages for Fedora Linux are available on an RPM repository maintained by Microsoft. But you need to import GPG key and add the repository before doing the actual installation of VS Code on Fedora.

Import repository key.

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

When done, add VS Code repository contents to your Fedora Linux.

cat <<EOF | sudo tee /etc/yum.repos.d/vscode.repo
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF

Then update the package cache and install Visual Studio Code on Fedora 31/30/29.

$ dnf check-update
$ sudo dnf install code
Visual Studio Code                              507 kB/s | 2.1 MB     00:04    
Last metadata expiration check: 0:00:03 ago on Fri 03 May 2019 10:11:19 PM EAT.
Dependencies resolved.
================================================================================
 Package      Architecture   Version                         Repository    Size
================================================================================
Installing:
 code         x86_64         1.33.1-1554971173.el7           code          66 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 66 M
Installed size: 66 M
Is this ok [y/N]: y

Package details such as version number can be checked with:

$ rpm -qi code
Version     : 1.33.1
Release     : 1554971173.el7
Architecture: x86_64
Install Date: Fri 03 May 2019 10:13:38 PM EAT
Group       : Development/Tools
Size        : 198174740
License     : Multiple, see https://code.visualstudio.com/license
Signature   : RSA/SHA256, Fri 12 Apr 2019 12:04:54 AM EAT, Key ID eb3e94adbe1229cf
Source RPM  : code-1.33.1-1554971173.el7.src.rpm
Build Date  : Thu 11 Apr 2019 11:26:26 AM EAT
Build Host  : 43a767683aef
Relocations : (not relocatable)
Packager    : Visual Studio Code Team <[email protected]>
Vendor      : Microsoft Corporation
URL         : https://code.visualstudio.com/
Summary     : Code editing. Redefined.
.....

To Launch VS Code on Fedora, run:

$ code

Or search from activities menu.

You should get 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.