This guide walks you through installing Visual Studio Code on Fedora Linux, following the recommended way.
Visual Studio Code (often abbreviated as VS Code) is a free, cross-platform, and open-source code editor developed by Microsoft that is available for Windows, Linux, and macOS.
The combination of a lightweight editor and powerful functionality has contributed to VS Code’s rise as one of the most popular integrated development environment (IDE) tools in recent years.
Its key features include syntax highlighting, built-in debugging support, embedded Git control, code completion, an integrated terminal, snippets, and code refactoring.
This guide will walk you through installing Visual Studio Code on your Fedora system using the officially approved method.
Install Visual Studio Code on Fedora Linux
The methods below show how to install Visual Studio Code on Fedora from the official Microsoft repository.
1. Import Microsoft’s GPG Key
To ensure that the packages we receive to install the Visual Studio Code are genuine, we should download and import the Microsoft signed GPG keys on our Fedora system.
To do so, type the following commands:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
2. Add Microsoft’s Visual Studio Code Repository
After importing the GPG keys, we’ll add the official Microsoft Visual Studio Code repository to our Fedora system. This implies that the update package will be made available with the rest of our system’s regular updates if a new version is released.
To accomplish it, type the command shown below.
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
3. Run System Update
Before we proceed with VS Code installation on our Fedora Linux system, we should update the list of available packages. So, run the below DNF command to update the repositories index.
sudo dnf update
As you can see, our new Microsoft Visual Studio Code repository is now available and ready to be used.
4. Install VS Code on Fedora Linux
Everything is already prepared for the actual installation. Now, to install VS Code on Fedora, run the following commands:
sudo dnf install code
4. Run Visual Studio Code on Fedora
After installation, you can start using VS Code by launching it from the desktop application menu. Search for “code,” and when its icon appears, click to run the same.
When you start VS Code for the first time, a window like the following should appear:
This guide showed how to install Visual Studio Code on Fedora Linux. If you have any questions, please leave them in the comments section below.
To learn more about Visual Studio Code, visit its official documentation page.