Linux Install VS Code: Step-by-Step Guide
Learn how to install Visual Studio Code on Linux across Debian/Ubuntu, Fedora, Arch, and more. This step-by-step guide covers apt, rpm, snap, and flatpak methods, post-install setup, troubleshooting, and best practices for a smooth development environment.
Goal: Install Visual Studio Code on Linux using a supported method (deb, rpm, snap, or flatpak) to complete the linux install vs code workflow. You’ll need a Linux distribution that supports your chosen package, internet access, and sudo privileges. This quick answer outlines the approach and prerequisites so you can start the full step-by-step guide quickly.
What linux install vs code means for developers
The phrase linux install vs code describes the practical process of bringing the Visual Studio Code editor to a Linux workstation. For developers, this means choosing a package method that matches your distribution, ensuring dependencies are met, and configuring VS Code to your workflow. According to Install Manual, a successful linux install vs code setup begins with clear prerequisites, an understanding of available packaging formats, and a plan for keeping the editor up to date. This approach helps you avoid post-install headaches and lets you start coding sooner, whether you primarily work on containers, server-side apps, or local GUI development, all within the Linux ecosystem.
Beyond merely installing software, the linux install vs code path emphasizes security, maintainability, and future-proofing. By sticking to official repositories or trusted sources, you minimize the risk of tampered packages. The Install Manual team stresses that a clean installation also enables you to manage extensions, themes, and settings consistently across Linux distributions, reducing friction when you move between machines or share a setup with others.
nameRemovedForClarityWithMarkdownMissingDetails?false?
note":null
Tools & Materials
- Linux-enabled computer(Any supported distro (Ubuntu/Debian, Fedora, Arch, etc.) with internet access)
- Internet access(Stable connection for package downloads and repository updates)
- Sudo privileges(Admin rights on the system to install software)
- VS Code package method(Choose deb, rpm, snap, or flatpak depending on your distro)
- Optional: post-install extensions(Popular choices include Python, C/C++, and GitLens)
Steps
Estimated time: 25-40 minutes
- 1
Identify your Linux distribution and target method
Open a terminal and run commands to determine your distro and architecture. This helps you pick the right package method (deb for Debian/Ubuntu, rpm for Fedora/openSUSE, snap or flatpak as universal options). Knowing your version prevents incompatible installations and simplifies troubleshooting.
Tip: Use commands like uname -m and lsb_release -a or cat /etc/os-release to confirm details. - 2
Update your package database
Before installing, refresh your package lists so you pull the latest VS Code package. This reduces the chance of conflicts or missing dependencies. Running an update also helps validate your network and repository access.
Tip: If you see repository errors, recheck your network proxy settings and DNS resolution. - 3
Choose and prepare your installation method
Decide among apt/dpkg (deb), rpm, snap, or flatpak based on your distro. Each method has pros and cons: apt/dpkg is lightweight on Debian-based systems; rpm is common on Red Hat family; snap provides isolation; flatpak offers broad compatibility.
Tip: If you value system-wide updates and minimal fragmentation, snap or flatpak are convenient; for native performance, use apt or rpm where available. - 4
Install VS Code via APT on Debian/Ubuntu-based distributions
Add the repository if required, update package lists, and install code. For many users, a simple apt install code after enabling the official repository is sufficient. This method aligns with typical Linux package management and keeps VS Code in sync with system updates.
Tip: Ensure curl or wget can reach https://packages.microsoft.com and that your system trusts the Microsoft signing key. - 5
Install VS Code via RPM on Fedora/openSUSE
Use your distro’s RPM flow to add the Microsoft repository key and install code. This approach integrates with rpm-based systems and leverages your distro’s native update mechanism, keeping Code consistent with other packages.
Tip: If your distro uses DNF, prefer dnf over rpm for dependency resolution. - 6
Install VS Code via Snap
Snap packages work across many distributions and provide automatic updates. Run sudo snap install --classic code to install VS Code with confinement that preserves compatibility across different Linux flavors.
Tip: Note that some users prefer to disable snap auto-updates for performance tuning in strict environments. - 7
Install VS Code via Flatpak
Flatpak provides a distribution-agnostic way to install VS Code via Flathub. Use flatpak install flathub com.visualstudio.code to get the app, then run flatpak run com.visualstudio.code to start it.
Tip: If Flatpak isn’t installed, install it from your distro’s repositories first. - 8
First launch and basic configuration
Open VS Code from your application menu or terminal by running code. Set your preferred theme, enable Git integration, and install essential extensions (e.g., Python, JavaScript/TypeScript, C/C++). Confirm the editor’s version with code --version.
Tip: Make a quick checklist of extensions you rely on to ensure a smooth first session.
Got Questions?
Can I install VS Code on any Linux distribution?
Yes, VS Code supports many major distributions. You can install via apt/dpkg, rpm, snap, or flatpak depending on your distro. If your distro isn’t listed, consult the official VS Code docs for the recommended method.
VS Code works on most common Linux distros; use the method that matches your package manager.
Which installation method should I use: apt, snap, or flatpak?
Choose based on your priorities: apt/dpkg offers native integration and faster updates on Debian/Ubuntu; rpm is common on Red Hat-based systems; snap and flatpak provide cross-distro compatibility and easier setup on non-standard distros.
Pick either native package managers for speed or universal options for cross-distro support.
Is VS Code open source?
Code - OSS is the open-source base of VS Code used by some repositories; VS Code itself is built on that base but includes proprietary components distributed by Microsoft. Both are maintained with regular updates.
There’s an open-source base, with a proprietary distribution as well.
How often should I update VS Code on Linux?
Update VS Code alongside your system updates to receive security patches and new features. Snap and Flatpak handle updates automatically by default, while apt and rpm users should run their package manager’s update commands regularly.
Keep Code up to date with your system updates for best security and features.
Do I need to reboot after installing VS Code?
No reboot is typically required after installing VS Code. If you installed via a system update that affected core libraries, a logout/login is usually sufficient.
Usually no reboot is needed; logging out or restarting the terminal suffices.
Can I install extensions offline?
Extensions generally download from the VS Code Marketplace when online. Some environments allow offline extension installation by downloading the .vsix files manually and using the Extensions view to install from local files.
Yes, offline installation is possible with local .vsix files if you have them downloaded.
Watch Video
Main Points
- Install VS Code on Linux using a preferred package method, not a mix of methods
- Choose apt/dpkg, rpm, snap, or flatpak based on distro compatibility
- Follow official docs for repository setup to ensure authenticity and updates
- Launch VS Code and customize with essential extensions for your workflow
- Maintain updates regularly to stay secure and productive

