Running Visual Studio Code On Linux
Có thể bạn quan tâm
- Docs
- Updates
- Blog
- API
- Extensions
- MCP
- FAQ
- Search
-
- Search Docs
- Download
Version 1.107 is now available! Read about the new features and fixes from November.
Dismiss this update Topics Overview Overview Linux macOS Windows VS Code for the Web Raspberry Pi Network Additional Components Enterprise Uninstall VS Code Tutorial Copilot Quickstart User Interface Personalize VS Code Install Extensions Tips and Tricks Intro Videos Display Language Layout Keyboard Shortcuts Settings Settings Sync Extension Marketplace Extension Runtime Security Themes Profiles Overview Voice Interactions Command Line Interface Telemetry Basic Editing IntelliSense Code Navigation Refactoring Snippets Overview Multi-root Workspaces Workspace Trust Tasks Debugging Debug Configuration Testing Port Forwarding Overview Setup Quickstart Overview Chat Sessions Add Context Review Edits Planning Checkpoints Tools Inline Chat Prompt Examples Chat Debug View Overview Background Agents Cloud Agents Inline Suggestions Overview Instructions Prompt Files Custom Agents Language Models MCP Prompt Engineering Context Engineering Edit Notebooks with AI Test with AI Debug with AI MCP Dev Guide Smart Actions Tips and Tricks Security FAQ Cheat Sheet Settings Reference Workspace Context Overview Quickstart Staging & Committing Branches & Worktrees Repositories & Remotes Merge Conflicts Collaborate on GitHub Troubleshooting FAQ Getting Started Tutorial Terminal Basics Terminal Profiles Shell Integration Appearance Advanced Overview JavaScript JSON HTML Emmet CSS, SCSS and Less TypeScript Markdown PowerShell C++ Java PHP Python Julia R Ruby Rust Go T-SQL C# .NET Polyglot Swift Working with JavaScript Node.js Tutorial Node.js Debugging Deploy Node.js Apps Browser Debugging Angular Tutorial React Tutorial Vue Tutorial Debugging Recipes Performance Profiling Extensions Tutorial Compiling Editing Refactoring Debugging Quick Start Tutorial Run Python Code Editing Linting Formatting Debugging Environments Testing Python Interactive Django Tutorial FastAPI Tutorial Flask Tutorial Create Containers Deploy Python Apps Python in the Web Settings Reference Getting Started Navigate and Edit Refactoring Formatting and Linting Project Management Build Tools Run and Debug Testing Spring Boot Modernizing Java Apps Application Servers Deploy Java Apps GUI Applications Extensions FAQ Intro Videos GCC on Linux GCC on Windows GCC on Windows Subsystem for Linux Clang on macOS Microsoft C++ on Windows Build with CMake CMake Tools on Linux CMake Quick Start Editing and Navigating Debugging Configure Debugging Refactoring Settings Reference Configure IntelliSense Configure IntelliSense for Cross-Compiling FAQ Intro Videos Get Started Navigate and Edit IntelliCode Refactoring Formatting and Linting Project Management Build Tools Package Management Run and Debug Testing FAQ Overview Node.js Python ASP.NET Core Debug Docker Compose Registries Deploy to Azure Choose a Dev Environment Customize Develop with Kubernetes Tips and Tricks Overview Jupyter Notebooks Data Science Tutorial Python Interactive Data Wrangler Quick Start Data Wrangler PyTorch Support Azure Machine Learning Manage Jupyter Kernels Jupyter Notebooks on the Web Data science in Microsoft Fabric AI Toolkit Overview AI Toolkit Copilot tools Models Playground Agent Builder Bulk Run Evaluation Fine-tuning (Automated Setup) Fine-tuning (Project Template) Model Conversion Tracing Profiling FAQ File Structure Manual Model Conversion Manual Model Conversion On GPU Setup Environment Without AI Toolkit Template Project Overview Getting Started Resources View Deployment VS Code for the Web - Azure Containers Azure Kubernetes Service Kubernetes MongoDB Remote Debugging for Node.js Overview SSH Dev Containers Windows Subsystem for Linux GitHub Codespaces VS Code Server Tunnels SSH Tutorial WSL Tutorial Tips and Tricks FAQ Overview Tutorial Attach to Container Create Dev Container Advanced Containers devcontainer.json Dev Container CLI Tips and Tricks FAQ Default Keyboard Shortcuts Default Settings Substitution Variables Tasks SchemaOn this page there are 8 sections
- Installation
- Install VS Code on Linux
- Updates
- Configure VS Code as the default text editor
- Use the custom title bar
- Windows as a Linux developer machine
- Next steps
- Common questions
Installation
-
Download and install Visual Studio Code for your Linux distribution
NoteVS Code ships monthly releases and supports auto-update when a new release is available.
-
Install additional components
Install Git, Node.js, TypeScript, language runtimes, and more.
-
Install VS Code extensions from the Visual Studio Marketplace
Customize VS Code with themes, formatters, language extensions and debuggers for your favorite languages, and more.
-
Enable AI features
TipIf you don't yet have a Copilot subscription, you can use Copilot for free by signing up for the Copilot Free plan and get a monthly limit of completions and chat interactions.
-
Get started with the VS Code tutorial
Discover the user interface and key features of VS Code.
Install VS Code on Linux
Debian and Ubuntu based distributions
-
The easiest way to install Visual Studio Code for Debian/Ubuntu based distributions is to download and install the .deb package (64-bit), either through the graphical software center if it's available, or through the command line with:
echo "code code/add-microsoft-repo boolean true" | sudo debconf-set-selections -
To manually install the apt repository:
-
Run the following script to 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 -
Lastly, update the package cache and install the package:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc && echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null -
Then update the package cache and install the package using dnf (Fedora 22 and above):
yum check-update && sudo yum install code # or code-insiders
Due to the manual signing process and the publishing system we use, the yum repo could lag behind by up to three hours and not immediately get the latest version of VS Code.
Snap
VS Code is officially distributed as a Snap package in the Snap Store

You can install it by running:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc && echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/zypp/repos.d/vscode.repo > /dev/null -
-
Then update the package cache and install the package using:
nix-env -i vscode
Install the .rpm package manually
You can manually download and install the VS Code .rpm package (64-bit), however, auto-updating won't work unless the repository above is installed.
Once downloaded, the .rpm package can be installed by using your package manager, for example with dnf:
xdg-mime default code.desktop text/plainDebian alternatives system
Debian-based distributions allow setting a default editor by using the Debian alternatives system, without concern for the MIME type. You can set this by running the following command and selecting code:
sudo update-alternatives --set editor /snap/bin/codeIf VS Code doesn't show up as an alternative to the default editor, you need to register it:
sudo apt-get install gvfs libglib2.0-binConflicts with VS Code packages from other repositories
Some distributions, for example Pop!_OS provide their own code package. To ensure the official VS Code repository is used, create a file named /etc/apt/preferences.d/code with the following content:
cat /proc/sys/fs/inotify/max_user_watchesThe limit can be increased to its maximum by editing /etc/sysctl.conf (except on Arch Linux and Ubuntu 24.10 and later, read below) and adding this line to the end of the file:
"files.watcherExclude": { "**/.git/objects/**": true, "**/.git/subtree-cache/**": true, "**/node_modules/*/**": true }I can't see Chinese characters in Ubuntu
We're working on a fix. In the meantime, open the application menu, then choose File > Preferences > Settings. In the Text Editor > Font section, set "Font Family" to Droid Sans Mono, Droid Sans Fallback. If you'd rather edit the settings.json file directly, set editor.fontFamily as shown:
# For .deb sudo apt-get update # For .rpm (Fedora 21 and below) sudo yum check-update # For .rpm (Fedora 22 and above) sudo dnf check-updateThe code bin command does not bring the window to the foreground on Ubuntu
Running code . on Ubuntu when VS Code is already open in the current directory will not bring VS Code into the foreground. This is a feature of the OS which can be disabled using ccsm.
sudo mkdir /etc/apt/sources.list.d sudo touch /etc/apt/sources.list.d/vscode.listCannot move or resize the window while X forwarding a remote window
If you are using X forwarding to use VS Code remotely, you will need to use the native title bar to ensure you can properly manipulate the window. You can switch to using it by setting window.titleBarStyle to native.
Repository changed its origin value
If you receive an error similar to the following:
sudo apt update 12/10/2025Từ khóa » Visual Studio Alternatives For Linux
-
Microsoft Visual Studio Alternatives For Linux - AlternativeTo
-
Visual Studio Code Alternatives For Linux - AlternativeTo
-
Is There A Very Strong IDE Like Visual Studio For Linux Systems? - Quora
-
Open Source Alternatives For Visual Studio IDE : R/linux - Reddit
-
20 Best Alternatives To Visual Studio As Of 2022 - Slant.Co
-
Is There A Visual Studio Style Tool/IDE? [duplicate] - Ask Ubuntu
-
Linux Alternative To MS Visual Studio (C++)
-
12+ Best Visual Studio Alternatives To Try In 2022 - Flatlogic Blog
-
Best Free And Open Source Alternatives To Microsoft Visual Studio
-
Alternatives To Visual Basic - Ubuntu Buzz
-
Best Free And Open Source Alternatives To Microsoft Visual Studio
-
Visual Studio For Linux - Visual Studio Feedback
-
Best IDE Alternatives To Visual Studio For 2022 - TechRepublic
-
4 Microsoft Visual Studio Alternatives: Productive IDE's