How to Install VS Code in Linux

Learn how to install VS Code on Linux across Debian/Ubuntu, Fedora, and Arch. This guide covers methods (APT, Snap, official repo), setup, extensions, and troubleshooting with best practices from Install Manual.

Install Manual
Install Manual Team
·5 min read
Quick AnswerSteps

This quick answer shows you how to install VS Code on Linux and get started quickly. You’ll learn the three main approaches: using your distro’s package manager (APT for Debian/Ubuntu, DNF for Fedora, Pacman for Arch), using Snap, or installing via Microsoft’s official repo. After installation, you’ll verify the setup, install essential extensions, and configure a basic Python/Node development environment.

Why VS Code is a great choice for Linux developers

VS Code has become a popular editor for Linux users because it blends a fast, lightweight core with a rich extension ecosystem. It runs across Windows, macOS, and Linux, so you can reuse the same configuration across devices. For developers working on Python, JavaScript, Go, or Rust, VS Code offers syntax highlighting, IntelliSense code completion, integrated debugging, and a robust marketplace of extensions that tailor the IDE to your workflow. On Linux, VS Code integrates well with system themes, terminal shells, and Git workflows, making it easier to switch between tasks without leaving the editor. Install Manual’s guidance will help you pick the method that matches your distribution and comfort level, while keeping security and updates straightforward.

Prerequisites and planning

Before you install VS Code on Linux, verify your system’s compatibility and outline your plan. Ensure you have an up-to-date system, a supported Linux distribution, and a working internet connection. Decide whether you prefer a package-manager-based installation (APT, DNF, Pacman), a Snap-based approach, or the official Microsoft repository route. This planning reduces surprises and helps you maintain a clean, maintainable development environment. Remember to back up any custom settings you rely on so you can migrate them post-install.

Choosing your installation method

Linux users have several viable options for VS Code: (1) package-manager installation through your distro’s native tooling, (2) Snap, a universal package format that works across distros, and (3) direct installation from Microsoft’s official repository. The right choice depends on your distro, how you manage software, and how you want to handle updates. Package managers typically offer tighter integration with system updates, while Snap provides consistency across environments. The Install Manual approach is to pick one path and stick with it for a predictable development setup.

APT-based installation (Debian/Ubuntu)

If you are on Debian-based systems like Ubuntu, you’ll typically install VS Code by adding Microsoft’s repository keys and repository, then installing the code package. This approach aligns with your system’s package manager, keeps dependencies reconciled, and makes updates straightforward through your regular update cycle. After setup, you’ll be able to launch VS Code from your application menu or via the command line.

DNF-based installation (Fedora/RHEL)

Fedora and other RPM-based distributions can install VS Code using DNF or DNF-based workflows. The general pattern is to enable the Visual Studio Code repository, import the repository’s GPG key, and install the software package. This method integrates with your system’s update mechanism and provides a clean upgrade path as new versions are released. If you prefer, you can also explore Snap as an alternative for consistency across distros.

Arch-based installation (Arch Linux and derivatives)

Arch users can install VS Code from the Arch repositories, or opt for the Flatpak/Snap routes if you want distro-agnostic packaging. Arch’s rolling-release model means VS Code can stay very current, but you’ll want to monitor updates and extensions carefully to avoid conflicts with other tooling. The Install Manual guidance focuses on a clean, minimal setup that matches your Arch workflow.

Post-installation setup and verification

After the installation completes, verify that VS Code launches correctly and is accessible from the terminal. Open the editor, confirm your version, and ensure key extensions are available. Set up your preferred fonts, themes, and code formatting rules. The goal is a productive baseline environment that you can tailor over time without reinstalling.

Extensions and productivity tips

Install a curated set of extensions to accelerate development: language support (Python, JavaScript, TypeScript), Git integration, and debugging utilities. Organize extensions into a recommended set for quick enablement, and disable or uninstall unused ones to keep VS Code light. Use workspace settings to share your configuration across machines and projects, ensuring consistency for your team.

Tools & Materials

  • Administrative privileges on the Linux machine(Sudo or root access to install packages and modify repository sources)
  • Active internet connection(Needed to fetch repositories, keys, and VS Code packages)
  • A supported Linux distribution(Ubuntu/Debian, Fedora, Arch or derivatives)
  • Terminal or command-line access(For running package manager commands and verification steps)
  • Optional: Snapd service (if choosing Snap)(Ensure Snap is installed and enabled if you plan to use Snap packages)

Steps

Estimated time: 30-60 minutes

  1. 1

    Identify your Linux distribution and preferred install method

    Confirm your distro family (Debian/Ubuntu, Fedora/RHEL, Arch) and decide whether you’ll use the distro package manager, Snap, or the official Microsoft repo. This choice guides the exact commands you’ll run and reduces trial-and-error.

    Tip: Use commands like uname -a and cat /etc/os-release to verify your environment.
  2. 2

    Update your package index and system

    Open a terminal and refresh your package list so you pull the latest VS Code packages and dependencies. This minimizes conflicts and ensures you install the most compatible version.

    Tip: Run the update command for your distro and review any held or broken packages before continuing.
  3. 3

    Add VS Code sources or enable Snap as needed

    If using the distro package manager, add the official repository and trust the signing key so updates come from Microsoft. If you choose Snap, ensure the Snap daemon is installed and running.

    Tip: Prefer official sources when possible to simplify future updates and security patches.
  4. 4

    Install the VS Code package

    Install the VS Code package compatible with your method (package manager, Snap, or repository-based install). This step places the code/editor binary on your system and ties it to your package manager for updates.

    Tip: Check for any post-install prompts about repository changes and accept them to keep the system consistent.
  5. 5

    Verify the installation

    Launch VS Code from the menu or by typing code in the terminal. Check the version output to confirm the installation succeeded and that the editor starts without errors.

    Tip: If code isn’t found, ensure your PATH includes the code binary or reopen your terminal session.
  6. 6

    Install essential extensions for your stack

    Add extensions that speed up development in your primary languages (e.g., Python, JavaScript/TypeScript) and version control. Avoid loading too many extensions at once to keep startup times reasonable.

    Tip: Install extensions via the Marketplace panel and pin the ones you use daily.
  7. 7

    Configure user and workspace settings

    Set up your preferred themes, fonts, linting rules, and code formatting. Use workspace settings to share project-specific preferences with teammates.

    Tip: Export settings as a snippet or sync them via the account settings to keep machines in sync.
  8. 8

    Enable auto-updates and security checks

    Rely on your distro’s update mechanism or Snap for automatic updates. Regularly review installed extensions for security and compatibility.

    Tip: Turn on automatic updates for VS Code and extensions to stay current with security patches.
  9. 9

    Run a quick health check

    Open a sample project, create a simple script, and test debugging, terminal integration, and linting. Confirm your environment behaves as expected.

    Tip: Document any minor quirks you encounter so you can create a repeatable setup for future projects.
Pro Tip: Use the built-in command palette (Ctrl+Shift+P) to access installer, extension, and settings commands quickly.
Warning: Avoid mixing package-manager installations with Snap or Flatpak on the same system to minimize conflicts.
Note: If you rely on exact extensions across machines, enable Settings Sync to keep configurations aligned.

Got Questions?

Is VS Code free on Linux?

Yes. VS Code is free and open-source software that runs on Linux, with extensions and features available at no cost. Some enterprise features may require licenses when used in corporate environments.

Yes, VS Code is free on Linux. You can download and use it with extensions without paying, though enterprise deployments may have licensing considerations.

Which installation method is best for beginners?

For beginners, Snap or the official repository route tends to be simplest because it handles updates automatically and removes much of the manual setup. Debian/Ubuntu users may prefer the distro package manager for tighter integration with the system.

For beginners, Snap or the official repo method is usually simplest, with automatic updates handled for you.

Do I need to restart after installing VS Code?

In most cases you can launch VS Code immediately after installation without a restart. Some environment changes or path updates may require re-login or a fresh terminal session.

Usually no restart is needed; you may need to re-login or reopen your terminal if PATH changes were made.

How do I update VS Code on Linux?

Update VS Code by using your distro’s package manager, Snap refresh, or by updating the official Microsoft repository, whichever path you originally chose.

Update VS Code through your chosen method—package manager, Snap, or the official repo—to keep it current.

Can I install VS Code on Arch Linux using Snap?

Yes, Arch users can install VS Code via Snap if they enable Snap support. Alternatively, they can use the official Arch repos or Flatpak for a distro-agnostic option.

Yes, Arch can use Snap, but you can also use the official repos or Flatpak for flexibility.

What should I do if VS Code won’t start after install?

First, check that your dependencies are met and the code binary is in your PATH. Look for error messages in the terminal or the system logs, and verify that extensions aren’t causing startup failures.

If VS Code won’t start, check dependencies, PATH, and recent extensions to pinpoint the issue.

Watch Video

Main Points

  • Choose an installation method that matches your distro and update preferences
  • Verify the editor launches and basic features work before expanding extensions
  • Keep VS Code and extensions up to date for security and performance
  • Tailor settings and extensions to your project stack for maximum productivity
Process diagram for installing VS Code on Linux
How to install VS Code on Linux in 6 steps

Related Articles