Guides 11792 Published by

To get Visual Studio Code (VS Code) running on Manjaro 21, you can choose between two methods: installing via Pacman or Flatpak. 



Getting Visual Studio Code Running on Manjaro 21

Manjaro 21 users who want a full‑featured editor that feels at home on Windows can get VS Code in a few clicks. The following walk‑through shows the cleanest ways to install it, why each method matters, and how to fix a couple of common hiccups.

Why Visual Studio Code is Worth the Effort

VS Code delivers IntelliSense for dozens of languages, built‑in Git, and a marketplace that’s larger than most IDEs. It also runs natively on Arch‑based systems, so there’s no need for a heavy VM or Wine wrapper. When you’re already comfortable with Pacman, adding a Microsoft repository is as simple as a few commands.

Add the Official Microsoft Repository

The fastest route keeps VS Code up‑to‑date via Pacman. First add Microsoft’s GPG key and repo:

sudo pacman-key --recv-keys F2C3B9E5
sudo pacman-key --lsign-key F2C3B9E5
echo -e "[code]\nServer = https://packages.microsoft.com/repos/vscode/\n" | sudo tee /etc/pacman.d/mirrorlist.code

# Force Pacman to re‑download the key database so it recognises Microsoft’s signature.
sudo pacman-key --refresh-keys

Why this matters: Without the signed key, Pacman will refuse to install packages from that repo. The --lsign-key step tells your system that you trust Microsoft’s key.

Now update and install:

sudo pacman -Syyu code

If a newer kernel just came out, some users have reported that the libgtk-3.so shared object is missing, causing VS Code to crash on launch. In that case, run:

sudo pacman -Syu libgtk-3

and retry.

Install via Flatpak (Alternative)

If you prefer sandboxing or want the newest preview builds, Flatpak works well on Manjaro:

sudo pacman -S flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

# Install VS Code from Flathub
flatpak install flathub com.visualstudio.code

Why use Flatpak? It isolates extensions and configuration, preventing accidental system changes. However, the Flatpak build can be a few minutes slower to start than the native Pacman one.

Verify the Installation

Launch VS Code from your application menu or via terminal:

code

On first run, it will download its internal extension store. If you see a “no extensions available” screen after a fresh install, that’s normal—just head over to the Extensions sidebar and pull in your favorite plugins.

Keep VS Code Fresh

When using the Microsoft repo, Pacman automatically tracks updates:

sudo pacman -Syu

If you used Flatpak, run:

flatpak update

Manjaro’s rolling release means you’ll get security patches without pulling a whole new OS version.

Optional Tweaks

  • Syncing Settings: VS Code’s Settings Sync can be turned on from File → Preferences → Settings Sync…. It pulls your extensions, keybindings, and snippets to any machine you log into.
  • Using Remote Development: For developers who work inside Docker or WSL‑like containers, install the “Remote – Containers” extension. The first time you open a container project, VS Code will ask if it should pull in its own Docker image—just say yes.

Quick FAQ

QuestionAnswer
Why does my VS Code crash after an Arch update?Missing libraries like libgtk-3 often get updated ahead of the repo. Re‑installing them fixes the issue.
Which installation method is lighter on disk space?The Pacman package is smaller than the Flatpak bundle because it shares system libs.
Can I use VS Code without a Microsoft account?Absolutely. You only need one for Settings Sync or GitHub authentication; otherwise, everything works offline.