Windows Subsystem for Linux (WSL) SupportVS Code integrates seamlessly with WSL, allowing you to develop in a Linux environment:
# Install the Remote - WSL extensioncode --install-extension ms-vscode-remote.remote-wsl# Open a folder in WSL from Windowswslcd /home/username/projectcode .
Windows Terminal IntegrationSet VS Code as your default editor in Windows Terminal:
# User InstallerVSCodeUserSetup-x64-1.111.0.exe /VERYSILENT /MERGETASKS=!runcode# System InstallerVSCodeSetup-x64-1.111.0.exe /VERYSILENT /MERGETASKS=!runcode
# Install Homebrew if you don't have it/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"# Install VS Codebrew install --cask visual-studio-code# Update VS Codebrew upgrade --cask visual-studio-code
The repository method allows you to update VS Code with sudo apt update && sudo apt upgrade.
2
RHEL/Fedora/CentOS Installation
Method 1: Download and Install .rpm Package
# Download the .rpm package (64-bit)wget -O code.rpm 'https://code.visualstudio.com/sha/download?build=stable&os=linux-rpm-x64'# Install on RHEL/Fedora/CentOSsudo rpm -i code.rpm# Or use dnf on Fedorasudo dnf install code.rpm
Method 2: Use Microsoft Repository
# Import Microsoft GPG keysudo rpm --import https://packages.microsoft.com/keys/microsoft.asc# Add repository (Fedora/RHEL 8+)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'# Update cache and install (RHEL/CentOS)sudo yum check-updatesudo yum install code# Or on Fedorasudo dnf check-updatesudo dnf install code
3
Snap Installation (Universal)
Snap packages work across many Linux distributions:
# Install via Snapsudo snap install --classic code# Update VS Codesudo snap refresh code
The --classic flag is required because VS Code needs full system access.
4
Arch Linux
VS Code is available in the Arch User Repository (AUR):
# Using yayyay -S visual-studio-code-bin# Or using paruparu -S visual-studio-code-bin# Manual installation from AURgit clone https://aur.archlinux.org/visual-studio-code-bin.gitcd visual-studio-code-binmakepkg -si
# Install via command linecode --install-extension ms-python.pythoncode --install-extension dbaeumer.vscode-eslintcode --install-extension esbenp.prettier-vscodecode --install-extension eamodio.gitlens# List installed extensionscode --list-extensions
4
Configure Git Integration
VS Code has built-in Git support. Configure your Git settings:
# Set your identitygit config --global user.name "Your Name"git config --global user.email "[email protected]"# Set VS Code as default editor for Gitgit config --global core.editor "code --wait"# Use VS Code as diff toolgit config --global diff.tool vscodegit config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"
For contributing to VS Code or developing in isolated environments:
# Clone the repositorygit clone https://github.com/microsoft/vscode.gitcd vscode# Install dependenciesnpm install# Build from sourcenpm run compile# Launch development versionbash scripts/code.sh
Building from source requires at least 4 Cores and 8 GB of RAM (9 GB recommended). See the development container README for details.