Install Visual Studio Code on Debian 11

Whenever you think about a good code editor, one of the best names that you often get to hear is Visual Studio Code. It is a free and open-source code editor created by Microsoft which can be used across multiple different platforms. Therefore, in today's article, we will be explaining to you the process of installing the Visual Studio Code on Debian 11. The steps shown here are compatible with the older Debian 10 version too.

Installing Visual Studio Code on Debian Linux

For installing Visual Studio Code or VS Code on Debian, you will need to perform the following steps:

The very first step that you need to follow before the actual installation process begins is to launch the terminal. For doing that, simply click on the Activities tab present on the Debian desktop. Doing this will cause a search bar to appear on your screen. Just type terminal in that search bar and click on the terminal search result to launch the terminal in Debian as shown in the image below:

Now you need to update your system so that there is no chance of any loopholes or broken links or dependencies and you can easily install VS Code on your Debian 10 system. For doing that, type the following command in your terminal and then press the Enter key:

sudo apt update

This command is shown in the following image:

As soon as your Debian system will finish the update, your terminal will look something like this:

Now you are required to install all the required dependencies for VS Code. For doing that, type the following command in your terminal and then press the Enter key:

sudo apt install software-properties-common apt-transport-https curl

This command is also shown in the image below:

During the execution of this command, your terminal will prompt you to give your consent i.e. whether you want to carry on with this installation or not. If you are agreed to do so, just type “Y” and then press the Enter key as shown in the following image:

As soon as all the required dependencies will be successfully installed.

Now you need to import the Microsoft GPG key. For doing that, type the following command in your terminal and then press the Enter key:

curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

This command is shown in the following image:

If the above-mentioned command will execute successfully, your terminal will respond with an OK message as shown in the image below:

The next step is to add the Visual Studio Code repository. For doing that, type the following command on your terminal and then press the Enter key:

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

Upon the successful execution of this command, your terminal will show you no confirmation message. This command is shown in the following image:

Once it has been executed successfully, the next step is to update your system once again with the update command mentioned above. As soon as your system will finish the update, you will be able to see the output shown in the image below on your Debian terminal:

Finally, you need to install the Visual Studio Code by typing the following command in your terminal and then pressing the Enter key:

sudo apt install code

This command is shown in the following image:

  • As soon as this command will execute successfully, your terminal will look something like this:
  • Now, for verifying if VS Code has been successfully installed on your system or not, type the following command in your terminal and then press the Enter key:
code --version

This command is shown in the image below:

As soon as this command will execute successfully, you will be able to see the version of your newly installed VS Code Editor.

You can also verify this by clicking on the Activities tab on your desktop and then typing visual studio code in the respective search bar. You will be able to see the VS Code in the search result as shown in the image below:

Conclusion

By following the method described in this article, you can easily install the Visual Studio Code on your Debian 11 or Debian 10 system and start using it right away. Moreover, you can also benefit yourself by keeping a track of your code modification history because of the efficient version control integration that this code editor provides.

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago