Skip to main content Jump to list of all articles

Quickly Install Visual Studio Code on Garuda Linux

I recently installed Garuda Linux on my Lenovo Yoga laptop. I came across an issue where I couldn’t install the Microsoft version of Visual Studio Code as it wasn’t in any of the repositories. After a little digging, I came across a way you can install it from a git repo. This may also work on other arch Linux based distributions. Please let me know in the comments.

Screenshot of Visual Studio Code Software

Now I have only tested this script on Garuda which is arch-based. Please let me know in the comments if this works on other arch based Linux distributions.

The problem with the initial method is that you have to repeat it if you needed to update the software. Doing this can be tedious so I created a little shell script that can be run whenever it needs updating. This saves you digging through the terminal for all the commands.

Download

Source Code

As an alternative to downloading and executing the script. You may also copy the following into your terminal.

#! /bin/sh

# Check for Git
sudo pacman -Sy --noconfirm
sudo pacman -S git --needed

# Download and Install VSCode
cd ~/Downloads
git clone https://aur.archlinux.org/visual-studio-code-bin.git
cd visual-studio-code-bin/
makepkg -s
sudo pacman -U visual-studio-code-bin-*.pkg.tar.zst

# Cleanup old files
cd ../ && sudo rm -rfv visual-studio-code-bin/

Installation

To install Visual Studio Code download and extract the zip file. Open a terminal, such as Alacritty. Make sure you navigate to the directory the file is placed in. Execute the command below and enter your password. The script should now install VSC to the opt directory. When you see an update notification in VSC, you can simply run the script again to update.

sh vscode-installer.sh

Sources

Install Visual Studio Code on Arch Linux


Discover more from WorldOWeb

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.