Ubuntu Install VS Code: A Practical Step-by-Step Guide
Learn how to install and configure Visual Studio Code on Ubuntu. This comprehensive guide covers official deb, Snap, and Microsoft repository methods, plus extensions, maintenance, and troubleshooting for a smooth development setup on Ubuntu.
You will install Visual Studio Code on Ubuntu using official deb, Snap, or the Microsoft apt repository method, then configure essential extensions and settings. This guide from Install Manual highlights key requirements, common pitfalls, and best practices to ensure a smooth setup on Ubuntu (22.04+). Follow the steps to launch VS Code, customize your environment, and start coding with confidence.
ubuntu install vs code: Why this pairing matters on Ubuntu
Visual Studio Code has become a staple for developers on Linux, and Ubuntu users enjoy a balanced mix of performance, extensibility, and ease of use. The Ubuntu ecosystem supports several installation methods, each with its own maintenance implications and update cadence. According to Install Manual, choosing the right path depends on your preferred update cadence, system stability, and how closely you want to track Microsoft releases. This guide explores the most common routes and helps homeowners, DIY enthusiasts, and renters set up a robust development environment without surprises. You will learn how to install VS Code on Ubuntu, verify the install, and tailor it with extensions for Python, Node.js, Java, or web development workflows. The goal is a reliable editor that stays current with minimal manual intervention, backed by the Install Manual team’s guidance to keep you on track throughout the process.
Quick-start overview of install methods
There are three main ways to install VS Code on Ubuntu, each with its own advantages. The official .deb package provides a familiar Debian-based workflow and straightforward upgrades via apt. Snap offers quick installs with sandboxing, convenient for isolated environments or systems with multiple users. The Microsoft repository method via apt gives you tight integration with your system’s package manager and centralized updates. Your choice should align with how you manage software on your Ubuntu machine, whether you value predictability (apt- or deb-based) or simplicity (Snap). For most users, starting with apt from the Microsoft repository provides the best balance of control and patch management, while beginners may prefer Snap for its out-of-the-box usability. The Install Manual approach emphasizes clarity, verifying each step before proceeding.
Method 1: Install via official .deb package
Downloading and installing the official .deb file is a straightforward path that fits well with standard Ubuntu workflows. First, obtain the Debian package from the official VS Code site. Then install the package using dpkg and resolve dependencies with apt. This route integrates neatly with your system’s package history and allows easy rollbacks if something goes wrong. After installation, you can launch VS Code and confirm the version matches expectations. If a dependency issue arises, running sudo apt --fix-broken install will typically correct it. The Install Manual guidance recommends staying consistent with your package manager to simplify future updates and avoid version drift across tools.
What to expect:
- Simple, file-based install that updates through apt.
- Clear separation from manual installs or containerized environments.
- Quick path for most users who want stability and predictability.
Pro tip: If you already have an existing .deb, use sudo dpkg -i code_*.deb followed by sudo apt-get -f install to fix missing dependencies.
Method 2: Install via Snap
Snap packages provide a convenient, sandboxed installation of VS Code that works well on diverse Ubuntu setups. If you prefer a hands-off approach to updates and isolation, Snap is appealing. However, note that Snap may incur slightly longer startup times and data isolation can affect extension behavior in some edge cases. To install, simply run sudo snap install --classic code. You can launch VS Code from your application menu or by typing code in the terminal. Snap keeps VS Code up to date automatically, so you’ll receive new features and fixes without manual intervention. If you’ve used Snap for other development tools, you’ll appreciate the consistency across your development environment. This method aligns with users who want minimal maintenance and system-wide availability.
Method 3: Install from Microsoft repository using apt
This method uses the official Microsoft repository to install and manage VS Code via apt, giving you seamless integration with your Ubuntu system’s package manager. Start by adding the Microsoft GPG key and repository, then update your package list and install code. This approach mirrors other apt-based software on your system, providing clear upgrade paths and centralized security updates. It’s especially useful for users who regularly update multiple development tools through a single channel. After enabling the repository, you can install code with sudo apt update && sudo apt install code. This path often appeals to users who want long-term support and predictable update cycles using familiar apt commands.
Post-install configuration: extensions, theming, and settings
With VS Code installed, the next step is to tailor the editor to your workflow. Install core extensions for your language stack (Python, JavaScript/TypeScript, Java, C/C++, etc.), debuggers, linters, and formatter tools. Customize the UI settings, keyboard shortcuts, and workspace-specific configurations to minimize friction. Consider enabling remote development features or SSH-based workflows if you work on remote servers. The Install Manual guidance emphasizes a deliberate, incremental setup: start with essential extensions, verify they work, and then layer on additional tools as your projects evolve. Keep an eye on resource usage and disable unused extensions to preserve performance on lower-end hardware.
Troubleshooting common issues and maintenance
Even experienced users encounter snags during installation. If the code command isn’t found after installation, ensure the binary is in your PATH or reinstall using the preferred method. For .deb and apt methods, running sudo apt update && sudo apt upgrade ensures you have the latest VS Code version. If VS Code won’t launch or extensions fail to load, check the logs (Help > Toggle Developer Tools) and review your extensions for compatibility with your current Ubuntu kernel and GNOME version. If you’re on a constrained network, consider offline installers or local mirrors. Regular maintenance includes updating your OS and VS Code, reviewing extension permissions, and keeping backup copies of your settings.
Security, updates, and best practices for long-term use
Security is a critical consideration for development environments. Regularly applying updates for both Ubuntu and VS Code helps protect against known vulnerabilities. Prefer the apt repository path or official deb for controlled updates, and be mindful of enabling any unnecessary extensions or features that could widen your attack surface. Use the built-in settings to enable automatic updates where appropriate, and enable two-factor authentication for accounts tied to your development tools. The Install Manual Team recommends documenting your setup, including installed extensions and workspace configurations, so you can reproduce or migrate your environment if needed. Finally, keep a habit of reviewing release notes before updating to anticipate breaking changes. This proactive maintenance supports a resilient development workflow on Ubuntu.
Tools & Materials
- A computer running Ubuntu 22.04+(With internet access and sudo privileges for installation commands.)
- Terminal or shell access(A standard GNOME Terminal or your preferred terminal emulator.)
- Sufficient disk space(Allow extra space for VS Code and extensions (recommended: 2-4 GB free).)
- Optional: Snap support(If choosing the Snap path, ensure Snap is installed on the system.)
- Text editor for notes(Helpful for drafting configuration changes and notes.)
Steps
Estimated time: Total time: 60-120 minutes
- 1
Decide on an install method
Assess your preferences: apt/deb for traditional maintenance, Snap for simplicity and isolation, or a Microsoft repository-based apt install for centralized updates. Choose the method that aligns with how you manage software on your Ubuntu system.
Tip: If you’re unsure, start with the Microsoft repo path for balanced control and updates. - 2
Prepare your system
Update your package lists and ensure your system is up to date. This reduces conflicts during installation and ensures you pull compatible VS Code binaries.
Tip: Run sudo apt update && sudo apt upgrade -y before starting. - 3
Install via official .deb package (if chosen)
Download the Debian package from the official site and install it with dpkg. Resolve dependencies if prompted using apt.
Tip: If you see dependency errors, run sudo apt -f install to fix them. - 4
Install via Snap (if chosen)
Install VS Code through Snap for a quick setup with sandboxing. This path requires network access and Snap to be available on your system.
Tip: Use sudo snap install --classic code and avoid mixing Snap with apt for this product. - 5
Install from Microsoft repository using apt (if chosen)
Add the Microsoft GPG key and the VS Code repository, update package lists, and install code. This keeps VS Code aligned with your system updates.
Tip: Ensure the repository is correctly added to avoid stale or missing updates. - 6
Launch and verify the installation
Open VS Code and confirm the version. Check the built-in terminal to ensure the code command is accessible from your shell.
Tip: Run code --version to verify the installed version. - 7
Install essential extensions
Add core extensions for your development stack (Python, JavaScript/TypeScript, C/C++, Docker, etc.). Configure preferences for formatting, linting, and IntelliSense.
Tip: Start with 2-3 extensions and expand as your projects demand. - 8
Tidy up and back up your configuration
Export your settings and list of installed extensions. This makes it easier to recreate the environment later or on a new machine.
Tip: Use Settings Sync or a simple dotfiles workflow for portability.
Got Questions?
Is VS Code free on Ubuntu and does it require paid extensions?
Yes, Visual Studio Code is free to use on Ubuntu. Core features are free, and many extensions are also free; some extensions may have paid features, but the editor itself does not require payment.
Yes, VS Code is free to use on Ubuntu, with many free extensions available.
Which install method is best for beginners on Ubuntu?
For beginners, Snap offers the simplest setup with automatic updates and minimal configuration. If you prefer traditional package management, using the Microsoft apt repository provides a balanced approach with easier updates and control.
For beginners, Snap is the simplest, while the Microsoft repo gives balanced control.
How do I update VS Code after installation on Ubuntu?
If you used the apt or deb path, update VS Code via sudo apt update && sudo apt upgrade. If you chose Snap, the app updates automatically in the background. Always keep Ubuntu and VS Code versions in sync for best compatibility.
Use apt update and upgrade for apt-based installs, or rely on Snap's automatic updates.
Can I run VS Code offline after installing it on Ubuntu?
Yes, you can run VS Code offline after installation, but you may need an initial online update or extension download. Extensions and regular updates will require internet access, so plan your offline workflow accordingly.
You can run it offline, but updates and extensions require internet access.
Are extensions safe to install from within VS Code on Ubuntu?
Extensions from the Marketplace are generally safe, but exercise caution with untrusted sources. Review permissions, install only necessary extensions, and keep them updated to minimize security risks.
Extensions are usually safe, but be selective and review permissions.
What if the code command isn’t found after installation?
If the code command isn’t found, verify that the VS Code binary is in your PATH or reinstall using the method you chose. You can also run which code to confirm its location and add it to your PATH if needed.
If code isn’t found, check PATH and reinstall if necessary.
Watch Video
Main Points
- Choose a single installation path to avoid conflicts
- Verify VS Code launches and has code in PATH
- Install essential extensions early for productivity
- Keep your Ubuntu and VS Code up to date for security and stability
- Document your setup for easy recreation or migration

