Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Visual Studio Code on Linux using the package method that matches your distribution: Microsoft provides official Debian, RPM, and Snap packages, while Arch AUR and Nix routes are community maintained. For most users, the easiest option is to download the matching package or configure the distribution’s package repository so updates arrive through its package manager.

Choose an installation method

Linux system Recommended method Update behavior
Debian or Ubuntu Download the official .deb package or configure Microsoft’s apt repository The package can add Microsoft’s repository and signing key so apt can install updates.
Fedora, RHEL, or CentOS Microsoft RPM repository Updates are managed through the distribution’s package manager. Microsoft notes that its repository can be up to three hours behind the latest VS Code release.
openSUSE or SLE Microsoft RPM repository configured for zypper Updates are managed through zypper.
Any distribution with Snap available Official Snap package Snap updates VS Code automatically in the background.
Arch Linux AUR package Community maintained; update details depend on the package and your AUR workflow.
Nix nixpkgs package Community maintained; update details depend on your Nix setup.

Microsoft’s current instructions and package downloads are on its Linux setup page and download page. Prefer the repository route for your distribution when you want ongoing package-manager updates; choose Snap if you already use Snap and prefer its background updates.

Install on Debian or Ubuntu

Install the downloaded DEB package

  1. Download the Linux .deb package from the official VS Code download page.
  2. In a terminal, change to the directory containing the downloaded file, then install it. Replace the placeholder with the actual filename:
    sudo apt install ./<file>.deb
  3. If prompted, allow the installer to add Microsoft’s apt repository and signing key. This makes future updates available through apt.

For older distributions, Microsoft documents installing with sudo dpkg -i <file>.deb, then resolving dependencies with sudo apt-get install -f. The apt install ./… method is preferable where supported because apt can handle dependencies during installation.

Configure the apt repository manually

If you want to set up the repository yourself rather than use the package prompt, follow Microsoft’s current Linux setup instructions to install its signing key and create the vscode.sources entry. Then refresh apt and install the package:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo apt update
sudo apt install code

To install the Insiders build instead, use code-insiders as the package name. For unattended installation, Microsoft’s guide also provides a debconf-set-selections command to enable repository setup without an interactive prompt; use the exact command from the live guide.

Install on Fedora, RHEL, or CentOS

Configure Microsoft’s RPM repository by importing its signing key and creating the repository file under /etc/yum.repos.d/, following the commands for your system in Microsoft’s Linux setup instructions. Fedora 22 and later use dnf:

sudo dnf install code

Older releases that use yum install with:

sudo yum install code

Microsoft says the repository may lag the latest VS Code release by up to three hours. That is a repository timing estimate, not a guarantee that every package will be delayed by that amount.

Install on openSUSE or SLE

Microsoft’s RPM repository also supports openSUSE and SLE. For these systems, put the repository configuration under /etc/zypp/repos.d/ as directed by the official setup guide, then install VS Code:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Learn How to Use Linux, Ubuntu Linux 22.04 Bootable 8GB USB Flash Drive - Includes Boot Repair and Install Guide Now with USB Type C
  • Ubuntu Linux 22 on a Bootable 8 GB USB type C OTG phone compatible storage
  • The preinstalled USB stick allows you to learn how to learn to use Linux, boot and load Linux without uninstalling your current OS
  • Comes with an easy-to-follow install guide. 24/7 software support via email included.
  • Comprehensive installation includes lifetime free updates and multi-language support, productivity suite, Web browser, instant messaging, image editing, multimedia, and email for your everyday needs
  • Boot repair is a very useful tool! This USB drive will work on all modern-day computers, laptops or desktops, custom builds or manufacture built!
sudo zypper install code

Install with Snap

If Snap is installed and available on your distribution, install the official VS Code Snap with:

sudo snap install --classic code

Snap updates the application automatically in the background. If your system does not recognize the snap command, install and enable Snap using the instructions for your distribution on Snap’s installation page.

Arch Linux and Nix options

Arch Linux

The Arch User Repository (AUR) package is community maintained, not an official Microsoft package. Microsoft directs Arch users to the Arch Linux Wiki’s Visual Studio Code page for package and installation guidance.

Nix

The nixpkgs package is also community maintained. Microsoft’s guide says to enable allowUnfree in config.nix, then install with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
nix-env -i vscode

Check the current Linux setup page for the instructions that apply to your Nix configuration.

Install a standalone RPM

If you cannot use the repository, download the official .rpm package and install it with your package manager. For example, on a system using dnf:

sudo dnf install <file>.rpm

A standalone RPM does not receive automatic updates unless you also configure the Microsoft repository. The repository is the better choice if you want to update VS Code through your normal package manager.

Verify the installation and open a project

After installation, run VS Code from your desktop application launcher or open a terminal in a project directory and enter:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
code .

The . means the current directory. To open a different folder, pass its path instead, for example code /path/to/project. Microsoft documents this terminal workflow in its Linux setup guide.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common package-manager problems

The installer reports that Git is missing

Microsoft notes that stale package lists can cause an error claiming that the git package is not installed. Refresh the package information, then retry the installation:

  • Debian or Ubuntu: sudo apt-get update
  • Fedora 22 and later: dnf check-update
  • Older Fedora releases: yum check-update

The package conflicts with another package named code

A Linux distribution may provide its own package named code. If installation reports a conflict, consult Microsoft’s troubleshooting instructions before removing or replacing packages; do not assume the conflicting package is safe to uninstall.

The apt sources directory is missing

If repository setup fails because /etc/apt/sources.list.d does not exist, follow the relevant recovery instructions in Microsoft’s Linux troubleshooting guide before retrying repository configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Debian trash integration is unavailable

Microsoft’s Linux troubleshooting guide identifies gvfs and libglib2.0-bin as packages related to Debian trash integration. If that integration is missing, check the guide for the applicable package instructions.

apt asks to accept a repository origin change

Microsoft recommends running apt update and accepting the repository origin change when prompted. Review the prompt and ensure it refers to the Microsoft VS Code repository before confirming.

Microsoft’s troubleshooting page covers these and other Linux-specific package issues: Troubleshooting package dependency issues.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.