In this article, we want to teach you how to Install and Use Visual Studio Code on Debian 11.
Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux.
How To Install Visual Studio Code on Debian 11
You need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article about the Initial Server Setup with Debian 11.
To install the Visual Studio Code follow the steps below.
Update the local package index with the following command:
sudo apt update
Install the dependencies that you need with the following command:
sudo apt install software-properties-common apt-transport-https curl
Now use the curl command to import the Microsoft GPG key:
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
The command should return ok in your output.
Here you should add the VS code repository on Debian 11 with the following command:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
Now you can install visual studio code on Debian 11:
$ sudo apt update $ sudo apt install code
Here you have VS code installed on your server. Now you can start using it.
How To Use VS code on Debian 11
VS Code can be launched from the command line by typing “code”.
Or you can click on the VS Code icon (“Applications -> Programming -> Visual Studio Code”).
When you start VS Code for the first time, a window like the following will be displayed:
You can now begin installing extensions and configuring VS Code according to your preferences.
Update Visual Studio Code on Debian 11
When a new version of Visual Studio Code is released you can update the package through your desktop standard Software Update tool or by running the following commands:
sudo apt update sudo apt upgrade
At this point, you learn to install VS Code on Debian 11. Also. you learn to launch it on your server.
Hope you enjoy it.