YouTip LogoYouTip

Vscode Linux Install

VSCode Linux Installation | Beginner Tutorial

VSCode Linux Installation | Beginner Tutorial

VSCode is a cross-platform free source code editor developed by Microsoft, supporting Windows, macOS, and Linux.

Before installing VS Code, ensure your device meets the following minimum requirements:

Operating System Minimum Requirements
Windows Windows 7 64-bit or higher
macOS macOS 10.11 El Capitan or higher
Linux Ubuntu 16.04+, Debian 9+, Fedora 30+, CentOS 7+

VS Code official download page: https://code.visualstudio.com/Download.

Image 1

By default, visiting the VS Code official website https://code.visualstudio.com/, the page will automatically match the installation package based on your system. For example, if I am using macOS, there will be a "Download for macOS" button:

Image 2

Installing on Linux

Visit the VS Code official website https://code.visualstudio.com/, it will display the installation packages for major Linux distributions.

Image 3

Using Package Manager Installation (Recommended)

For Debian-based systems (like Ubuntu):

sudo apt update
sudo apt install software-properties-common apt-transport-https wget
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 (like Fedora):

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "nname=Visual Studio Codenbaseurl=https://packages.microsoft.com/yumrepos/vscodenenabled=1ngpgcheck=1ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
sudo dnf check-update
sudo dnf install code

Directly download binary package installation

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

Running VS Code

To start VS Code in the terminal, input code. Alternatively, open it through the system menu.

Image 4

The VSCode 'code' Command

Enabling the VSCode 'code' command is very simple. First, open the Command Palette:

  • MacOS shortcut key: β‡§βŒ˜P
  • Windows/Linux shortcut key: Ctrl + Shift + P

Search for "Install > shell command:"

Image 5

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

← Vscode Extensions ChineseVscode Windows Install β†’