This guide will take you through how to install VS Code on Fedora 36. Microsoft developed Visual Studio Code, generally known as VS Code, a source code editor for Windows, Linux, and macOS. It has features such as debugging support, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Users have the option to modify their preferences, keyboard shortcuts, theme, and extensions to add new features.
How to Install VS Code on Fedora 36
- Change to superuser.
sudo su -
- Update your packages.
dnf update
- Import VS Code GPG key using the command below.
rpm --import https://packages.microsoft.com/keys/microsoft.asc
- Then add VS Code repository using the following command.
cat <<EOF | sudo tee /etc/yum.repos.d/vscode.repo [code] name=Visual Studio Code baseurl=https://packages.microsoft.com/yumrepos/vscode enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc EOF
- Next, install VS Code.
dnf install code -y
Sample output
Visual Studio Code 31 kB/s | 26 MB 14:11 Last metadata expiration check: 0:14:26 ago on Mon 27 Jun 2022 10:39:41 AM EAT. Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Installing: code x86_64 1.68.1-1655263151.el7 code 112 M Transaction Summary ================================================================================ Install 1 Package Total download size: 112 M Installed size: 333 M Downloading Packages: code-1.68.1-1655263151.el7.x86_64.rpm 90 kB/s | 112 MB 21:13 -------------------------------------------------------------------------------- Total 90 kB/s | 112 MB 21:13 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : code-1.68.1-1655263151.el7.x86_64 1/1 Running scriptlet: code-1.68.1-1655263151.el7.x86_64 1/1 Verifying : code-1.68.1-1655263151.el7.x86_64 1/1 Installed: code-1.68.1-1655263151.el7.x86_64 Complete!
- After the installation, VS Code can be launched using the command below.
code
- Alternatively, VS Code can also be launched from the application menu.
- When VS Code is launched, select your preferred configurations then click Next section to continue.
- Create or open an existing project.
- Sample opened file.
Uninstall VS Code on Fedora 36
- Run the following command to remove VS Code.
sudo dnf autoremove code -y
Sample output
Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Removing: code x86_64 1.68.1-1655263151.el7 @code 333 M Transaction Summary ================================================================================ Remove 1 Package Freed space: 333 M Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Erasing : code-1.68.1-1655263151.el7.x86_64 1/1 Running scriptlet: code-1.68.1-1655263151.el7.x86_64 1/1 Verifying : code-1.68.1-1655263151.el7.x86_64 1/1 Removed: code-1.68.1-1655263151.el7.x86_64 Complete!
- Then remove VS Code repository from your system.
sudo rm /etc/yum.repos.d/vscode*
- You have reached the end of our article, congratulations. We have gone through how to install VS Code on Fedora 36.
Read more on VS Code Documentation
Other Tutorials
Install VS Code Editor on Ubuntu 22.04