2 ways to install VS code on Debian 11 Bullseye Linux

0

Learn how to install Microsoft Visual Studio Code on Debian 11 Bullseye or 10 Buster easily using the command terminal.

“Visual Studio Code” from Microsoft is a free, open source code editor that can be installed on common operating systems. It also contains a lot of useful features for developers. Although the tool comes from Microsoft, it is also available for Mac OS and Linux, which makes the cross-system development of applications in teams much easier.

Microsoft promises that applications with the ASP.NET Framework and Node applications in particular can be created very quickly on VS code. For this reason, Visual Studio code provides built-in debugging support for the Node.js runtime environment. Developers can debug JavaScript, TypeScript, and any other JavaScript-based language in VS Code without the need for an additional tool.

Website creation with HTML, CSS, JSON, LESS, SASS, PHP JavaScript and other technologies is also very easy. Your project can be created as a Git repository. To make the programmer’s life easier, VSCode has integrated some convenience functions, such as:

Well, you already know this coding platform. So let’s talk about the main topic of this article, which is the easy way to install VS Code on the latest Debian 11 or 10 desktop Linux distribution.

Steps to install Visual Studio Code on Debian 11 or 10

The steps given here also apply to Kali Linux, Ubuntu, Linux Mint, Elementary OS, MX Linux, POP! OS, and others.

1. way with repo:

Add GPG key for Microsoft Visual Studio code

We need to add a key that was used to sign the packages of this encoding platform. Otherwise, the system will not accept the VSCode repository to download the required packages.

curl -sSL https://packages.microsoft.com/keys/microsoft.asc -o microsoft.asc
gpg --no-default-keyring --keyring ./ms_vscode_key_temp.gpg --import ./microsoft.asc
gpg --no-default-keyring --keyring ./ms_vscode_key_temp.gpg --export > ./ms_vscode_key.gpg
sudo mv ms_vscode_key.gpg /etc/apt/trusted.gpg.d/

Add VS Code repository on Debian 11

Next, manually add the repo of this code editor on your Debian operating system using the command given below:

echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list

Perform system update

To ensure that the system can recognize the newly added repository packages, run the system update command once:

sudo apt update

Command to install Visual Studio Code

Finally, run a single command to get the packages on your Debina system to install VS Code:

sudo apt install code

Uninstallation (optional)

Well, there’s always a point where you don’t need an application installed, and if the same goes for VSCode, here are the commands to remove it completely.

sudo apt remove code
sudo rm /etc/apt/sources.list.d/vscode.*
sudo rm /etc/apt/trusted.gpg.d/ms_vscode_key.gpg

Second method with deb binary file directly

Open browser in Debian

Go to your Debian Linux system and open any browser. However, the default setting is Firefox.

Download the VS Code Debian package

The next step is to visit the VS code’s official website to download the package that is available to install on Debian and its Linux based systems. Here is the link to the download page.

Go to Downloads

First open the Command Terminal. If you used the browser to download the Visual Studio Code Debian file, go to “Downloads“. This is because the file we get from the browser is automatically included in it.

cd Downloads
ls

Install Visual Code Studio on Debian 11 or 10

Now we can use either the APT package manager or the DPKG tool to install the VS Code’s downloaded .deb file. To do this, just run the command given below.

sudo apt install ./file-name.deb

Substitute Filename. deb with the actual name of the downloaded file.

sudo apt install ./code_*_amd64.deb

Run the code editor

Go to All Applications, look for VScode and when the icon appears, click to do the same.

Uninstall or remove

Those who no longer need Visual Studio Code on their Debian Linux can remove it with the following command:

sudo apt remove code

Other articles:


Source link

Share.

Leave A Reply