Learn the simple way to install Microsoft Visual Studio Code on Debian 11 Bullseye or 10 Buster using command terminal.
Microsoft’s “Visual Studio Code” is a free and open-source code editor available to install on popular operating systems. It also contains many useful functions 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.
Well, you would already know about this Coding platform, hence, let’s talk about the main topic of this article that is the simple way to install VS Code on the latest Debian 11 or 10 desktop Linux distro.
- Steps to install Visual Studio Code on Debian 11 or 10
- Add Microsoft Visual Studio Code GPG Key
- Add VS Code Repository on Debian 11
- Run system update
- Comand to install Visual Studio Code
- Uninstallation (optional)
- Open browser in Debian
- Download the VS Code Debian Package
- Switch to Downloads
- Install Visual code Studio on Debian 11 or 10
- Run the Code Editor
- Uninstall or Remove
Steps to install Visual Studio Code on Debian 11 or 10
The steps given here are also applicable for Kali Linux, Ubuntu, Linux Mint, Elementary OS, MX Linux, POP!OS and others.
#1st Way using repo:
Add Microsoft Visual Studio Code GPG Key
We need to add a key that has been used to sign the packages of this coding 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
The next thing is to add the repo manually of this code editor on your Debian OS, 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
Run system update
To ensure that the system could recognize the newly added repo packages, run the system update command once:
sudo apt update
Comand 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
Well, there is always a point when you don’t require any installed application, and if the same goes for VSCode then here are the commands to completely remove it.
sudo apt remove code sudo rm /etc/apt/sources.list.d/vscode.* sudo rm /etc/apt/trusted.gpg.d/ms_vscode_key.gpg
2nd Method using Deb binary file directly
Open browser in Debian
Go to your Debian Linux system and open whatever browser you have. However, the default one is Firefox.
Download the VS Code Debian Package
The next step is to visit the official webpage of VS code to download the package available to install on Debian and its based Linux systems. Here is the link to the download page.
Switch to Downloads
First, open the Command Terminal. If you have used the browser to download the Visual Studio code Debian file, then switch to “Downloads“. It is because the file we get from the browser goes automatically into that.
Install Visual code Studio on Debian 11 or 10
Now, we can either use the APT package manager or DPKG tool to install the downloaded .deb file of VS Code. To do that, simply run the below-given command.
sudo apt install ./file-name.deb
Replace file-name. deb with the actual name of the file you have downloaded.
sudo apt install ./code_*_amd64.deb
Run the Code Editor
Go to All Applications, search for VScode and when its icon appears, click to run the same.
Uninstall or Remove
Those who don’t require Visual Studio Code anymore on their Debian Linux can remove it using the command:
sudo apt remove code
- 3 Ways to install Visual studio code in Ubuntu using terminal
- How to install SLACK on Debian 11 Bullseye
- Install WineHQ on Debian 11 Bullseye
- Install i3 Window manager on Debian 11…