4 Ways to Install Visual Studio Code on Fedora Linux

Visual Studio Code is not new for developers, however, many of us might not know how to install Vs Code on Fedora 40/39/38/36 or any other version of this Linux, so we have created this tutorial to help them out.

Developed by Microsoft, Vs Code is a feature-rich IDE and code editor that is published under the open source license as a cross-platform application rather than sticking to Windows only. It supports debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.

Installation of VS Code is quite easy on Fedora Linux using its graphical software store, however, here we will also discuss some other ways so that you can select the best installation approach according to your needs.

#1: Install VS Code Using the Official Repository

Microsoft maintains an official repository for VS Code, which can be added to the Fedora system. Also, this method ensures that the users will have the latest updates for this software directly through the DNF package manager of the system.

  1. Open the Fedora Command Terminal

To add the official repository of VS code for its installation on Fedora we need to access the command terminal. Go to the Application menu and search for Terminal to open it.

Fedora Terminal

  1. Import the Microsoft GPG Key and Vscode Repository::

Next, we need to import the GPG key of Microsoft that Fedora needs to confirm the packages we will have from the VS code repository are authentic and in the same state as they were released by the developers. The given command will also add the VScode repo.

The given command will create a new repo file in /etc/yum.repos.d/ named vscode.repo to add the following content.

sudo tee /etc/yum.repos.d/vscode.repo <<EOF
name=Visual Studio Code
  1. Run System Update command:

After adding the repository, perform the system update to refresh the DNF package list cache.

sudo dnf update
  1. Install Visual Studio Code on Fedora:

Finally, we have the official repository of Vs Code on Fedora, now we can easily install the Visual Studio Code using the command terminal.

sudo dnf install code
dnf install code

#2: Use Vs Code Snap Package on Fedora

The other way is to have the VS code using the Snap package manager, it is a universal package management system created by Canonical. However, Snap installation on Fedora is pretty easy, here are the steps:

  1. Enable Snap Support:

Use the Fedora package manager and install the “Snapd” package to get the SNAP feature.

sudo dnf install snapd
  1. Start and Enable the Snap service:

By default the Snap service will not be activated, therefore, use the following command to not only start but also enable it:

sudo systemctl enable --now snapd
  1. Install VS Code using Snap-on Fedora:

Finally, use the Snap package manager and get the Visual Studio Code using a single command:

sudo snap install code --classic

#3: Get Visual Studio Code Using Flatpak

Like Snap, Flatpak is also a universal package manager and is recommended to use because it also integrates automatically into the Gnome Software Store app.

  1. Enable Flatpak Repository (Flathub):

Flatpak will already be installed on Fedora, hence, we only need to enable its repository called “Flathub“.

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  1. Install VS Code via Flatpak:

After adding the FlatHub repo, we can use the Flatpak command to get the package for installing the VS Code IDE on Fedora.

sudo flatpak install flathub com.visualstudio.code

#4: Install VS Code Using Gnome Software Store

The easiest way to install Vs Code on Fedora is by using the default Software store available on it. Because of GUI, anyone can use this method even those who are not familiar with Linux systems.

  1. Add FlatHub Repository on Fedora

Before using the Software App, make sure the FlatHub repository is already enabled on your Fedora system. If you already have not enabled it, then in your command terminal execute the given command:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  1. Open GUI Software Store

Click on the Activities indicator or press the Win key to open the Applications menu. There, either search for the store by typing “Software” in the search box or click its icon given on the Dock.

Launch Fedora Gnome Software Store app
  1. Search for VS Code

After opening the Software Store app, click on the Search icon given on the top left side, and then type – VS code to search it.

Search VS code Gnome software
  1. Install Vs code using Software App

As this open-source Microsoft IDE appears, click it to open further options and then hit the “Install” button to get the Visual Studio Code on your Fedora Linux.

Install Visual studio code using Software Store GUI

Start the IDE

No matter which way you have used to get the Visual Studio code on Fedora, to run it, simply click on the Activities Indicator button and then search “VS Code“, as its icon appears click to run it.

4 Ways to install VS code on Fedora

For Future Updates

Well, as per the method you have used to install the VS code, here are the commands to get the future updates for the application:

For DNF package manager users:

sudo dn update

For Snap users:

sudo snap refresh code

For Flatpak users:

sudo flatpak update com.visualstudio.code

For GUI Gnome Software:

GUI Software Store users can simply open it and search again for the “Visual Studio Code” and this time instead of the Install button you will see the “Update“, if any updates are available for the IDE application.


Learning the way to uninstall an application is also important because in the future if you don’t want the app then removal will help you free up some space.

Removing VSCODE using DNF

sudo dnf remove code

For Snap removal:

sudo snap remove code

To remove Visual Studio code via FlatPak:

sudo flatpak remove com.visualstudio.code

Other Articles:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.