Fedora

How to Install and Setup Visual Studio Code on Fedora Linux

Visual Studio Code is a lightweight code editor developed by Microsoft. The unique thing about Visual Studio Code is that it combines the code editor’s simplicity with the core edit-build-debug cycle that the developers require. VS Code has features like embedded Git control, snippets, code refactoring, code completion, syntax highlighting, and built-in debugging support.This tool works as an editor for programming languages like TypeScript, Node.js, and JavaScript. Furthermore, Visual Studio Code provides various plugins and language extensions including Go, PHP, Python, C, and C++ to increase its functionality. Let’s now look at the methods to install and setup the Visual Code Studio Code on Fedora Linux.

How to Install and Setup the Visual Studio Code on Fedora Linux

We divided this section into multiple parts to explain the different ways to install the Visual Studio Code and set it up in the system.

From the Repository

You can install the VS code by creating a repository. First, run the following command to create the “vscode.repo” file:

sudo nano /etc/yum.repos.d/vscode.repo

Now, add the following lines in the files that you created:

[vscode]

name=Visual Studio Code

baseurl=https://packages.microsoft.com/yumrepos/vscode

enabled=1

gpgcheck=1

gpgkey=https://packages.microsoft.com/keys/microsoft.asc

Once you save the file, you can manually run the following command to import the GPG key for package signing:

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

Finally, you can install the Visual Studio Code on Fedora 38:

sudo dnf install code

The Official VS Code Snap Package

First, you need to install the snap utility in your Fedora system. So, run the following command:

sudo dnf install snapd -y

Now, enable the snapd services through the following command:

sudo systemctl enable --now snapd.socket

To create a symbolic link between /snap and /var/lib/snapd/snap, run the following command:

sudo ln -s /var/lib/snapd/snap /snap

Once you are done, run the following command to install the VS code:

sudo snap install code --classic

How to Setup the Visual Studio Code

After installing the VS code in the system, you can now open it from the Application Menu.

Select “New File” in the VS Code UI to start your editing.

This tool provides multiple extensions. You can install the extensions according to your requirement.

Conclusion

The Visual Studio Code editor provides a customizable and lightweight environment for managing the codes, debugging, and writing across frameworks and programming languages. The purpose of this tutorial is to explain how to install and setup the Visual Studio Code on Fedora Linux.

Here, we installed the VS Code on Fedora 38 through the repository and snap packages. Both methods are very easy, and you can install this tool using any of the methods at your convenience. Once installed, open the tool to set it up to start working quickly.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.