MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

AlmaLinux+VSCode

with one comment

How to install and configure VSCode on AlmaLinux (Red Hat Enterprise 9). This is a step-by-step version of the Visual Studio documentation. The first thing you do is download the Microsoft packages:

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

Next, create the yum repository with the following command:

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

It creates the following vscode.repo file in the /etc/yum.repos.d directory:

[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

Then, update the package cache and install the package using dnf dnf, like this as the sudoer user:

sudo dnf check-update

The log file for this is:

You can install the VSCode package using dnf dnf, like this as the sudoer user:

sudo dnf install -y code

The log file for this is:

Click on Activities in the upper left corner and then the clustered nine dots to view applications. Choose the Visual Studio and double click and you should see the following dialog:

Choose a color schema that works for you, then click the less than symbol in the top left hand corner to start working with Visual Studio Code:

As always, I hope this helps those looking for step-by-step instructions and clarity of complete examples.

Written by maclochlainn

December 19th, 2022 at 8:50 pm