How to Install VS Code on Fedora 38: A Step-by-Step Guide

Revisited and updated on November 06th, 2023.


Visual Studio Code

Visual Studio Code is an Extensible and customizable code editor developed by Microsoft.

Besides, it is free, open-source code and It has gained immense popularity among developers and is widely used for a variety of programming languages and development tasks. VS Code is available. It is a terminal emulator for Linux and Unix-like operating systems.

Easily use extensions in VS Code


Check your OS

This step is optional. It's just to make sure you have Fedorainstalled.


/etc/os-release

cat /etc/os-release


hostnamectl

hostnamectl

Output

When you run hostnamectl without any options, it provides detailed information about the system's hostname, operating system, kernel, and other system-related settings.


lsb_release

lsb_release -a

Output

lsb_release is a command-line utility commonly found in Linux distributions that adhere to the Linux Standard Base (LSB). The LSB is a standardization initiative that aims to increase compatibility between different Linux distributions by defining a common set of libraries and conventions.


uname

uname -a

Output

The uname -a command is used to display detailed system information about the Linux operating system. It provides information about the system's kernel and other system-related details.


Let's get down to business

shall we?

The-office GIFs - Get the best GIF on GIPHY


Solution

By importing a Microsoft GPG key and creating a new repository configuration for the Visual Studio Code, let's use the dnf package manager to install Visual Studio Code.


Import a Microsoft GPG

This step is to ensure we import the GNU Privacy Guard public key into the system.

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

Output

rpm is the Red Hat Package Manager, a tool used for managing software packages on Red Hat-based Linux distributions, such as Red Hat Enterprise Linux, CentOS, and Fedora.

The --import is an option for the rpm tool, indicating that you want to import a GPG key.


Create a repository configuration file for VS Code

udo 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'

Output:

This command creates a repository configuration file for Visual Studio Code, called vscode.repo, in the /etc/yum.repos.d/ directory.

It makes it available for installation and updates via the YUM package manager on your Linux system.

The configuration file specifies the repository's name, location, whether it's enabled, and how to perform GPG signature checks on the packages.


Check for updates

dnf check-update

Output

The dnf check-update command contacts the configured software repositories to check if there are any updates available for the installed packages.

It doesn't perform any actual updates, it merely checks if there are updates available and provides a list of available updates.


Install Visual Sutdio Code

sudo dnf install code

Output


Check installation

Version

code --version

Output

[phunter@192 ~]$ code -v
1.83.1
f1b07bd25dfad64b0167beb15359ae573aecd2cc
x64

Executable file's path

which code

Output

[phunter@192 ~]$ which code
/usr/bin/code

Open Visual Studio Code

code

Output:


Done


Celebrate

image.png


Let's become friends


Final thoughts

Thank you for reading this article.

If you have any questions, thoughts, suggestions, or corrections, please share them with us.

We appreciate your feedback and look forward to hearing from you.

Feel free to suggest topics for future blog articles. Until next time!