install official vs code on fedora
How to install the official Microsoft VS Code application on Fedora
1
Import the Microsoft GPG Key
Open your terminal and run the following command. This key is used to verify that the packages you are downloading are genuinely from Microsoft and haven't been tampered with.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
2
Add the Visual Studio Code Repository
Next, run this command to create the repository file. This tells your system's package manager (dnf) where to find the official VS Code packages.
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
Install Visual Studio Code
Now that the repository is set up, you can update your package cache and install VS Code with a standard dnf command:
sudo dnf check-update
sudo dnf install code
That's it! Visual Studio Code is now installed on your system. You can find it in your application list and you will receive updates automatically through the standard Fedora software update process.
Last modified: August 6th, 2025