Install and Use Visual Studio Code on Debian 11

In this article from Orcacore, 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 that runs on your desktop and is available for Windows, macOS, and Linux.

It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, and Go) and runtimes (such as .NET and Unity).

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:

Visual Studio Code window on Debian 11

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

Conclusion

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.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!