How To Install Visual Studio Code on AlmaLinux 9

This guide will teach you How To Install Visual Studio Code or VS Code on AlmaLinux 9.

Visual Studio Code is a free, lightweight but powerful source code editor that runs on your desktop and on the web and is available for Windows, macOS, Linux, and Raspberry Pi OS.

It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other programming languages (such as C++, C#, Java, Python, PHP, and Go), runtimes (such as .NET and Unity), environments (such as Docker and Kubernetes), and clouds (such as Amazon Web Services, Microsoft Azure, and Google Cloud Platform).

Steps To Install Visual Studio Code on AlmaLinux 9

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with AlmaLinux 9.

Install Visual Studio Code on AlmaLinux 9

First, you need to update your local package index with the following command:

sudo dnf update -y

Then, install the development tools by using the command below:

sudo dnf groupinstall "Development Tools"

Visual studio code packages are not available in the default AlmaLinux repository. So you need to add it to your server.

Import Visual Studio Code GPG key

Here you need to import the GPG key to verify the authenticity of the packages to be installed. To do this, run the command below:

sudo rpm --import

Add Visual Studio Code Repository

Now use the following command to import the repository on your server:

printf "[vscode]\\nbaseurl=\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscode.repo

When you are done, run the system update:

sudo dnf update -y

Install VS Code on AlmaLinux 9

Now you can install Visual studio code on AlmaLinux 9 by using the following command:

sudo dnf install code -y

How To Launch VS Code

At this point, you can use different ways to open your VS code. You can easily launch your software, by using the following command:


Or, you can run the code & command, which you can continue to use the terminal during the application session:

code &

Also, you can open VSCode from your desktop. To do this, follow the following path:

Applications -> Programming -> Visual Studio Code

When you start VS Code for the first time, a window like the following will be displayed:

visual studio code app

You can now begin installing extensions and configuring VS Code according to your preferences.

For more information, you can visit Visual Studio Code Documentation.

Update Visual Studio Code on AlmaLinux 9

When a new version of Visual Studio Code is released you can update the package through your desktop standard Software Update tool or by running the following commands:

# sudo apt update
# sudo apt upgrade

Remove VS Code

When you no longer want VSCode installed on your system, use the following command to remove it:

sudo dnf autoremove code -y

Next, remove the repository using the following command if you plan never to re-install the IDE again:

sudo rm /etc/yum.repos.d/vscode*


At this point, you have learned to Install Visual Studio Code on AlmaLinux 9.

Hope you enjoy it.

You may be like these articles:

How To Install WineHQ on AlmaLinux 9

Install Varnish Cache with Nginx on AlmaLinux 9

How To Install Anaconda on AlmaLinux 9

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!