How to Install Visual Studio Code on Fedora 36 / Fedora 35


Visual Studio Code is a cross-platform source code editor developed by Microsoft. It has built-in debugging support, syntax highlighting, code completion, embedded Git control, code refactoring, and snippets.

Visual Studio Marketplace offers lots of plugins and extensions to extend the functionality of VS code.

Here, we will see how to install Visual Studio Code on Fedora 36 / Fedora 35.

Add VS Code Repository

Visual Studio Code is available from the Microsoft repository for the Fedora operating system. So, you will need to set up the Microsoft repository on your system to get the VS Code package.

First, switch to the root user.

sudo su -

Then, download and import the Microsoft signing GPG key using the following command in the terminal.

rpm --import

Finally, add the Microsoft Visual Studio Code repository to your system.

cat << EOF > /etc/yum.repos.d/vscode.repo
name=Visual Studio Code

Install Visual Studio Code on Fedora 36

Once you have added the repository to the system, use the dnf command to install Visual Studio Code.

dnf install -y code


Fedora 36 - x86_64 - Updates                                                                 17 kB/s |  24 kB     00:01
Fedora 36 - x86_64 - Updates                                                                472 kB/s | 1.7 MB     00:03
Fedora Modular 36 - x86_64 - Updates                                                        3.5 kB/s | 3.6 kB     00:01
Fedora Modular 36 - x86_64 - Updates                                                         27 kB/s |  76 kB     00:02
Visual Studio Code                                                                          9.4 MB/s |  25 MB     00:02
Last metadata expiration check: 0:00:01 ago on Wed 25 May 2022 09:44:33 AM EDT.
Dependencies resolved.
 Package                 Architecture              Version                                    Repository               Size
 code                    x86_64                    1.67.2-1652812909.el7                      code                    111 M
Transaction Summary
Install  1 Package
Total download size: 111 M
Installed size: 329 M
Downloading Packages:
code-1.67.2-1652812909.el7.x86_64.rpm                                                        19 MB/s | 111 MB     00:05
Total                                                                                        19 MB/s | 111 MB     00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                    1/1
  Installing       : code-1.67.2-1652812909.el7.x86_64                                                                  1/1
  Running scriptlet: code-1.67.2-1652812909.el7.x86_64                                                                  1/1
  Verifying        : code-1.67.2-1652812909.el7.x86_64                                                                  1/1

Launch Visual Studio Code

Once the VS Code is installed on your system, you can launch it by going to Activities >> search for Visual Studio Code or running the command code in the terminal.

Visual Studio Code running on Fedora 36:

Visual Studio Code running on Fedora
Visual Studio Code running on Fedora

Update Visual Studio Code

Microsoft releases updates for Visual Studio Code every month. So, to update the Visual Studio Code to the latest version, use the below command.

dnf update -y code


I hope you have successfully installed Visual Studio Code on Fedora 36 / Fedora 35. Next, you can head to install extensions and configure VS Code according to your preferences.

You might also like