Documentation
Topics Overview Overview Agents Quickstart Editor Tutorial Intro Videos Overview Get started Agents Quickstart Agents Tutorial Best Practices Concepts Agents Agent Harnesses Language Models Context Tools Sessions & Handoff Agent Host Architecture Customization Workspace Context Trust & Safety Run agents Agents Window Chat View Choose an Agent Harness Use Tools Browser Tools Approvals & Permissions Review & Revert Changes Artifacts Remote Agent Sessions Plan Work Memory Subagents Sessions Manage Sessions Session History AI Security Customize agents Create and Manage Instructions Agent Skills Custom Agents Language Models MCP Hooks Plugins Tools Prompt Files Use chat Chat Basics Inline & Quick Chat Add Prompt Context Tutorials & guides Customize AI Context Engineering Test-Driven Development Test with AI Test Web Apps with Browser Tools Debug with AI Edit Notebooks with AI Optimize AI Credit Usage MCP Dev Guide Prompt Examples Reference Cheat Sheet Settings Reference MCP Configuration Hooks Reference OpenTelemetry Monitoring Troubleshooting Troubleshooting Debug Chat Interactions Diagnose Prompt Caching FAQ Editor Overview Quickstart Repositories & Remotes Staging & Committing Source Control History Branches & Worktrees Merge Conflicts Collaborate on GitHub Troubleshooting FAQ Get Started Terminal Basics Terminal Profiles Shell Integration Appearance Advanced Debugging Debug Configuration Tasks Testing Integrated Browser Port Forwarding Guides & Tutorials Test-Driven Development Test Web Apps with Browser Tools Overview Enterprise Policies AI Settings Extensions Telemetry Updates Overview VS Code for the Web SSH SSH Tutorial Tunnels Dev Containers WSL WSL Tutorial GitHub Codespaces VS Code Server Linux Prerequisites Tips and Tricks FAQ GitHub Copilot Setup Linux macOS Windows Raspberry Pi Network Portable Mode Additional Components Uninstall Languages & Runtimes Extension DocsOn this page there are 7 sections
Installing Visual Studio Code on Linux
Visual Studio Code is available on Linux through official Debian, RPM, and Snap packages. Community-maintained packages are also available for Arch Linux and Nix.
Install VS Code on Linux
Choose the package method that matches your Linux distribution.
Debian and Ubuntu-based distributions-
Download the .deb package.
-
Install the package with the graphical software center, or install it from the command line:
To manually install the apt repository:
-
Install the signing key:
Types: deb URIs: https://packages.microsoft.com/repos/code Suites: stable Components: main Architectures: amd64,arm64,armhf Signed-By: /usr/share/keyrings/microsoft.gpg -
Update the package cache and install the package:
-
Update the package cache and install the package with
dnfon Fedora 22 and later:yum check-update && sudo yum install code # or code-insiders
NoteSnap packageDue to the manual signing process and publishing system, the yum repository could lag behind by up to three hours and not immediately contain the latest version of VS Code.
VS Code is officially distributed as a Snap package in the Snap Store.
Install the Snap package with this command:
-
-
Update the package cache and install the package:
nix-env -i vscode
Download and install the VS Code .rpm package manually when repository installation is not available. Auto-update does not work unless the repository is installed.
Install the downloaded .rpm package with your package manager, for example with dnf:
Debian alternatives system
Debian-based distributions support setting a default editor through the Debian alternatives system, without concern for the MIME type. Set VS Code as the default editor with this command:
sudo update-alternatives --set editor /snap/bin/code
If VS Code doesn't show up as an alternative to the default editor, register it:
Some distributions, such as Pop!_OS, provide their own code package. To ensure that the official VS Code repository is used, create a file named /etc/apt/preferences.d/code with this content:
sudo apt-get install gvfs libglib2.0-bin
"Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)
This notification indicates that the VS Code file watcher is running out of file handles. This often happens when opening a workspace that contains many files. Before adjusting platform limits, add large folders, such as Python .venv, to the
files.watcherExclude
setting. Other running applications might also consume file handles, so closing other applications might help.
View the current limit by running:
fs.inotify.max_user_watches=524288
Load the new value:
I can't see Chinese characters in UbuntuOpen the application menu, then choose File > Preferences > Settings. In the Text Editor > Font section, set Font Family to Droid Sans Mono, Droid Sans Fallback.
To edit the settings.json file directly, set
editor.fontFamily
:
# Install
sudo apt-get update
sudo apt-get install compizconfig-settings-manager
# Run
ccsm
Under General > General Options > Focus & Raise Behavior, set Focus Prevention Level to Off. This operating system setting applies to all applications, not only VS Code.
Cannot install .deb package due to "/etc/apt/sources.list.d/vscode.list: No such file or directory"This error can occur when sources.list.d doesn't exist or the current user doesn't have access to create the file. Create the folder and an empty vscode.list file:
Use apt instead of apt-get and accept the origin change when prompted:
| Web Proxy Viewer | New URL | Original Page |