Fedora does not ship Microsoft’s Visual Studio Code package in its default repositories, so the usual dnf search route stops short unless you add an upstream source. Two practical paths let you install Visual Studio Code on Fedora, and the comparison table below breaks down the trade-offs.
The Microsoft repository is the cleaner path if you want the official package and the fastest updates through DNF. Flathub still works when you prefer Flatpak, and the Fedora-specific snags mostly come down to Flatpak scope, SELinux, and Wayland.
Install Visual Studio Code on Fedora
On Fedora, the DNF package names are code for the stable build and code-insiders for the preview build. If you try dnf install vscode, DNF will not find the package because vscode is not the package name.
| Method | Channel | Builds | Updates | Best For |
|---|---|---|---|---|
| DNF package | Microsoft RPM repository | Stable + Insiders | Handled through DNF | Most Fedora users who want the official package and the fastest release cadence |
| Flatpak | Flathub | Stable only | Handled through Flatpak | Users who prefer a sandboxed package and do not need the Insiders build |
For most Fedora systems, use the Microsoft repository. The Flathub package is a repackaged Flatpak, Microsoft does not support that packaging directly, and the app page only publishes the stable build.
If you want the open-source build without Microsoft telemetry, install VSCodium on Fedora instead.
Install Visual Studio Code from the Microsoft RPM Repository
This method installs the official Microsoft package and keeps updates inside your normal DNF workflow.
sudo dnf upgrade --refresh
The commands below use
sudofor root privileges. If your account is not in the sudoers file yet, follow the guide on how to add a user to sudoers on Fedora.
Import the Microsoft signing key, then write the repository file. The tee command handles the file write with root privileges, which a plain > redirect cannot do on its own.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo tee /etc/yum.repos.d/vscode.repo > /dev/null <<'EOF'
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
autorefresh=1
type=rpm-md
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF
After the repository is in place, verify that Fedora can see both the stable and Insiders packages:
dnf list --available code code-insiders --repo code
Updating and loading repositories: Visual Studio Code 100% | 440.2 KiB/s | 151.0 KiB | 00m00s Repositories loaded. Available packages code.armv7hl 1.110.0-1772587995.el8 code code.aarch64 1.110.0-1772588000.el8 code code.x86_64 1.110.0-1772588031.el8 code code-insiders.armv7hl 1.111.0-1772644287.el8 code code-insiders.x86_64 1.111.0-1772644305.el8 code code-insiders.aarch64 1.111.0-1772644309.el8 code
Install the Visual Studio Code Stable Build
The stable build is the right choice for most development machines.
sudo dnf install code
Install the Visual Studio Code Insiders Build
Use Insiders when you want preview features before they reach the stable channel.
sudo dnf install code-insiders
To verify the stable build, check the version below. If you installed Insiders instead, run code-insiders --version.
code --version
1.110.0 0870c2a0c7c0564e7631bfed2675573a94ba4455 x64
DNF imports the Microsoft signing key during the first install. Review the fingerprint it shows before you accept the prompt.
Install Visual Studio Code from Flathub
This method installs the stable build as a Flatpak. Fedora Workstation already includes Flatpak, but Flathub is opt-in, and the command below adds it as a system remote so the package is available to every user.
sudo flatpak remote-add --if-not-exists --system flathub https://dl.flathub.org/repo/flathub.flatpakrepo
The explicit --system flag matters on Fedora systems that already have both user and system Flathub remotes. It prevents the ambiguous remote prompt that otherwise stops the install.
sudo flatpak install --system flathub com.visualstudio.code
Verify that the Flatpak package is installed in system scope:
flatpak list --app --system | grep -i "Visual Studio Code"
Visual Studio Code com.visualstudio.code 1.109.5 stable system
Flathub packages the proprietary Microsoft build into a Flatpak. The Flathub app page marks that packaging as unsupported by Microsoft, so use the Microsoft repository if you want the official upstream package path.
Launch Visual Studio Code on Fedora
Once the package is installed, start the matching launcher for the method you chose.
Launch Visual Studio Code from a Terminal
Use the command that matches your installed build:
code
code-insiders
flatpak run com.visualstudio.code
You can open a project directly with
code /path/to/projector launch the current working directory withcode ..
Launch Visual Studio Code from Activities
Fedora GNOME does not assign a default terminal shortcut, so the simplest desktop path is to launch VS Code from Activities.
- Open Activities.
- Type Visual Studio Code in the search field.
- Press Enter or select the icon to launch it.


Troubleshoot Visual Studio Code on Fedora
These fixes cover the Fedora-specific issues readers are most likely to hit after the install finishes.
Fix Flathub Remote Ambiguity for Visual Studio Code
If your system has both user and system Flathub remotes, Flatpak can stop and ask which one to use instead of continuing the install.
error: No remote chosen to resolve 'flathub' which exists in multiple installations Remote 'flathub' found in multiple installations: 1) system 2) user Which do you want to use (0 to abort)? [0-2]: 0
Run the add and install commands again with explicit system scope:
sudo flatpak remote-add --if-not-exists --system flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak install --system flathub com.visualstudio.code
Then confirm the system remotes look correct:
flatpak remotes --system
fedora oci flathub
Fix Visual Studio Code Dev Container Permission Errors on Fedora
Fedora enables SELinux by default, and that can block a dev container from reading or writing files in your project directory unless the bind mount is labeled correctly.
A typical failure inside the container looks like this:
python main.py
python: can't open file '/workspaces/myproject/main.py': [Errno 13] Permission denied
Add the :Z relabel flag to the workspace mount in .devcontainer/devcontainer.json, then rebuild the container:
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,Z",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}"
}
The uppercase :Z flag applies a private SELinux label for one container. Use lowercase :z only when multiple containers need to share the same mounted files.
Fix Visual Studio Code Input Method Issues on Fedora Wayland
Input method frameworks such as fcitx5 and ibus can behave badly when VS Code falls back to XWayland instead of using Electron’s Wayland support.
Test the Wayland hint first from a terminal:
ELECTRON_OZONE_PLATFORM_HINT=auto code
If that fixes the issue for the RPM package, export the variable in your shell profile so future terminal launches inherit it:
echo 'export ELECTRON_OZONE_PLATFORM_HINT=auto' >> ~/.bashrc
Open a new shell after saving the profile change. This is the cleanest permanent fix when you usually launch VS Code from a terminal. If you mostly start VS Code from Activities, keep testing with the one-line launch command above until you know the Wayland hint solves the input issue for your setup.
Update or Remove Visual Studio Code on Fedora
After the first install, updates and removal stay with the package manager that owns the package.
Update Visual Studio Code on Fedora
The Microsoft repository updates through DNF, while the Flatpak build updates through Flatpak itself.
sudo dnf upgrade --refresh
sudo flatpak update --system
Remove Visual Studio Code on Fedora
Remove the package that matches your install method, then delete the repository or user data only if you no longer need it.
Remove the Visual Studio Code RPM Package
Use the command that matches the build you installed, then remove the repository file if you are done with both channels.
sudo dnf remove code
sudo dnf remove code-insiders
sudo rm -f /etc/yum.repos.d/vscode.repo
Verify that neither RPM package remains installed:
rpm -q code code-insiders
package code is not installed package code-insiders is not installed
Remove the Visual Studio Code Flatpak Package
If you installed the Flathub package in system scope, remove it with the same scope.
sudo flatpak uninstall --system com.visualstudio.code
Then confirm that the Flatpak app no longer appears in the system application list:
flatpak list --app --system | grep -i "Visual Studio Code" || echo "Visual Studio Code Flatpak not installed"
Visual Studio Code Flatpak not installed
Remove Visual Studio Code User Data
These commands permanently delete your VS Code settings, extension data, snippets, and cached files. Export anything you want to keep before you continue.
The paths below cover settings, extensions, cached files, local data, and the Flatpak sandbox directory for both the stable and Insiders builds.
rm -rf ~/.config/Code ~/.config/Code\ -\ Insiders
rm -rf ~/.vscode ~/.vscode-insiders
rm -rf ~/.cache/Code ~/.cache/Code\ -\ Insiders
rm -rf ~/.local/share/Code ~/.local/share/Code\ -\ Insiders
rm -rf ~/.var/app/com.visualstudio.code
Frequently Asked Questions
No. Fedora’s default repositories do not ship Microsoft’s Visual Studio Code package. To install Visual Studio Code on Fedora, use the Microsoft RPM repository for the official build or Flathub for the Flatpak package.
Use the Microsoft repository if you want the official package, the fastest DNF updates, and access to both <code>code</code> and <code>code-insiders</code>. Use Flathub if you prefer Flatpak sandboxing and only need the stable build. The Flathub package is a repackaged Flatpak and Microsoft does not support that packaging directly.
Yes. After you add the Microsoft repository, install <code>code-insiders</code> with DNF. Flathub only publishes the stable <code>com.visualstudio.code</code> package, not the Insiders build.
Because the official DNF package name is <code>code</code>, not <code>vscode</code>. Use <code>sudo dnf install code</code> for the stable build or <code>sudo dnf install code-insiders</code> for the preview build after you add the Microsoft repository.
Visual Studio Code is Microsoft’s proprietary build with Microsoft branding and services. VSCodium is a community build of the open-source VS Code codebase that removes Microsoft telemetry and branding. If that is the better fit for your workflow, install VSCodium on Fedora instead.
Conclusion
Visual Studio Code is ready on Fedora through either Microsoft’s DNF repository or the Flathub package, so you can keep updates inside the package manager you already use. From here, install Git on Fedora for version control, install Docker on Fedora if your workflow depends on containers, or enable SSH on Fedora for remote development with the Remote SSH extension.
Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>