Installation
https://code.visualstudio.com/docs/setup/linux
- Update your system’s package list to ensure you get the latest version of VS Code:
sudo apt update
- Install dependencies required for adding repositories over HTTPS
sudo apt install software-properties-common apt-transport-https curl
- VS Code is published by Microsoft, and you’ll need to add its GPG key to verify the integrity of the downloaded packages:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-archive-keyring.gpg
- Add the VS Code repository to your system
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
- Update your package list again and install VS Code
sudo apt update
sudo apt install code
- Once the installation is complete, you can launch Visual Studio Code from the terminal
code
Alternative Method: Install VS Code via Snap
- If you prefer, you can install VS Code using
snap
, which is an easy method:
sudo snap install --classic code