VSCode Linux Installation
VSCode is a cross-platform, free source code editor developed by Microsoft, supporting Windows, macOS, and Linux.
Before installing VS Code, please make sure your device meets the following minimum requirements:
| Operating system | Minimum requirements |
|---|---|
| Windows | Windows 7 64-bit or later |
| macOS | macOS 10.11 El Capitan or later |
| Linux | Ubuntu 16.04+, Debian 9+, Fedora 30+, CentOS 7+ |
VS Code official website download page:https://code.visualstudio.com/Download。
By default, visiting the VS Code official website https://code.visualstudio.com/, the page automatically matches the installer to your system. For example, on macOS, a 'Download for macOS' button appears:

Install on Linux
Visit the VS Code official website https://code.visualstudio.com/, and the installation packages for major Linux distributions will be displayed.

Install using a package manager (recommended)
For Debian-based systems (such as Ubuntu):
sudo apt update
sudo apt install software-properties-common apt-transport-https
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code
For Red Hat-based systems (such as Fedora):
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
sudo dnf check-update
sudo dnf install code
Directly download the binary package to install
Download the appropriate .deb or .rpm file from the VS Code official website.
For .deb files:
sudo dpkg -i code*.deb
sudo apt-get install -f
For .rpm files:
sudo rpm -i code*.rpm
Run VS Code
Type code in the terminal to launch VS Code, or open it through the system menu.

The code command of VSCode
Enabling the code command in VSCode is very simple. First, open the Command Palette:
- macOS shortcut: ⇧⌘P
- Windows/Linux shortcut: Ctrl + Shift + P
Search for and install >shell command:

Then select Shell Command: Install 'code' command in PATH to add a reference to the code command in the system PATH.
