Microsoft’s Visual Studio Code is an open-source, cross-platform code editor. It provides built-in debugging support, code completion, integrated terminal syntax highlighting, embedded Git control, code refactoring, and snippets.
The following are the steps to install Visual Studio Code on CentOS/AlmaLinux.
Step 1: Import the Microsoft GPG key with this command:
# sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
Step 2: Create the repo file as below to enable the Visual Studio Code repository:
# sudo nano /etc/yum.repos.d/vscode.repo
Step 3: Add the below-given content in the 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
Step 4: Save and exit the vscode.repo.
Step 5: Install the latest version of Visual Studio Code with this command:
# sudo yum install code
Visual Studio Code is installed on your CentOS/AlmaLinux; now you can open it from Applications -> Programming -> Visual Studio Code.
