Visual Studio Code

How to Install Visual Studio Code Editor on ArchLinux

Visual Studio Code is free, open-source, incredibly robust, and one of the most acclaimed source-code editors out there. Developers around the world use Visual Studio Code to edit code for a variety of programming languages, most notably, Javascript, Java, and C++. Visual Studio Code is available for Linux, as well as more commercial operating systems, such as Windows and macOS. The software also comes with multiple extensions for file transfer protocol, which allows it to be used for web development.

A developers survey conducted in 2019 places Visual Studio Code at #1, with well over 50% of respondents voting in favor. This level of popularity speaks to the utility of this extremely versatile coding editor.

This tutorial will show you how to install Visual Studio Code on ArchLinux using Snaps.

Step 1: Install Snap

Snap is available in the Arch User Repository, so we will be downloading it from there.

Enter the following code to install snap on your system:

$ git clone https://aur.archlinux.org/snapd.git

$ cd snapd

$ makepkg -si

Step 2: Enable Snap

Once you install Snap, you will need to activate systemd, which overlooks the main communication socket, before proceeding to install Visual Studio Code.

$ sudo systemctl enable --now snapd.socket


Then, link the /var/lib/snapd/snap directory with /snap by entering the following:

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

Step 3: Install Visual Studio Code from the AUR

To download the installer package, enter the command below:

$ curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/visual-studio-code-bin.tar.gz


Then, to unzip the build files, enter:

$ tar -xvf visual-studio-code-bin.tar.gz


Switch to the extracted package directory by issuing the following code:

$ cd visual-studio-code-bin


Finally, enter the following to install Visual Studio Code:

$ makepkg -si

Conclusion

This tutorial showed you how to install Visual Studio Code onto your Archlinux system with a snap package. Snap is a software packaging system that works across several Linux distributions and it allows users to obtain software packages onto their system.

That is all we have for you today. Stick around at linuxhint.com for more tutorials like this, and happy coding!

About the author

Younis Said

Younis Said

I am a freelancing software project developer, a software engineering graduate and a content writer. I love working with Linux and open-source software.