Select Page

Install Visual Studio Code on Debian

by | Last Updated: Sep 23, 2022 | LINUX, SOFTWARE

Visual Studio Code (VS Code) is a Microsoft-developed and maintained, freeware code editor. It can be used in all popular Linux distributions. Features such as Debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git make visual studio code very popular among the development community.

Visual Studio Code can be used as a simple code editor by default. However, by installing extensions, its capabilities may be further enhanced, transforming it into a robust Integrated Development Environment (IDE). You can install the Python extension in VS Code, for example, to turn it into a lightweight Python IDE. Let me show you two different methods to install visual studio code in simple steps.

It is assumed that

  1. Debian Linux has already been installed and it has internet access.
  2. You are logged in as a user with Sudo privileges.

Download & Install VS Code in Debian

We can download and install VS Code by following two methods:

  1. Use a web browser to download the package file and then install it. [Easiest Method]
  2. Use Linux terminal to add repository and key so as to install VS code.

Method 1: Using Web Browser [Easiest Methods]

I personally use this method to keep it simple and easy. Using this method, it will automatically install the apt repository and signing key to enable auto-updating.

Step 1: Visit VS Code official website from Debian OS and download the .deb file/package.

download visual studio code for debian
l
Note

If you are using Red Hat Linux / Fedora / CentOS, you may download .rpm file.

Step 2: Save the package. Click OK. Normally, it saves it in Downloads folder.

save vscode deb file
downloaded vscode deb file

Step 3: To install this package, open a terminal program and Navigate the path where the file is downloaded. The file is downloaded in /home/raees/Downloads folder.

Linux Terminal Command

[email protected]:~$ cd /home/raees/Downloads
[email protected]:~/Downloads$ ls
code_1.60.2-1632313585_amd64.deb

Use dpkg command to install visual studio code.

Linux Terminal Command

[email protected]:~/Downloads$ sudo dpkg -i code_1.60.2-1632313585_amd64.deb
[sudo] password for raees:
Selecting previously unselected package code.
(Reading database ... 163281 files and directories currently installed.)
Preparing to unpack code_1.60.2-1632313585_amd64.deb ...
Unpacking code (1.60.2-1632313585) ...
Setting up code (1.60.2-1632313585) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for shared-mime-info (2.0-1) ...
[email protected]:~/Downloads$

That’s it. You are done with the installation.

Method 2: Using Command Line / Terminal

With this method, you will install the repository and key manually by using the following commands:

For Debian 11

1. Update the index of the repository.

sudo apt update

2. Install curl and HTTPs support for apt so as to get packages from online repositories.

sudo apt install -y curl apt-transport-https

3. Download and import the GPG key from Microsoft.

curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg –dearmor -o /usr/share/keyrings/ms-vscode-keyring.gpg

4. Add VS Code respository to your system.

echo “deb [arch=amd64 signed-by=/usr/share/keyrings/ms-vscode-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main” | sudo tee /etc/apt/sources.list.d/vscode.list
5. Once again, update the index of the repository.
sudo apt update
6. Install VS Code now.
sudo apt install -y code

Verify VS Code Installation

To open visual studio code, click on the Applications menu and click on Visual Studio Code under the Development menu item.

run vscode debian menu

You may also run visual studio code through Linux terminal. Just type code and press Enter.

[email protected]:~/Downloads$ code
run vscode debian

The Bottom Line

  • Visual Studio Code is a freeware cross-platform code editor managed by Microsoft which can be run on Debian Linux.
  • Numerous extensions are available to install inside VS Code that further extend its functionality.
  • VS Code can work as a powerful IDE for different programming languages. For instance, installing python and Pylance extension extends your environment with features such as IntelliSense, Linting, Code formatting, Debugging, Testing, etc…

Recent Posts

Introduction to Virtualization
Introduction to Virtualization

Virtualization is the process of creating a software-based representation of something physical, such as a server, desktop, network, or storage device.

Install Python on Windows 10
Install Python on Windows 10

Step by step guide to install python on Windows 10. Verify Python installation. Disable path length limit and set environment variable for Python.

Install VS Code on Windows 10
Install VS Code on Windows 10

Step by step guide to install Visual Studio Code on Windows 10. VS Code comes with powerful features and can be installed on Windows, Linux, macOS.

Major Open Source Applications
Major Open Source Applications

Open-source software and applications are free, stable, and secure. For all types of open-source applications, the original source code is available.

Open-source Licensing and Terminologies
Open-source Licensing and Terminologies

Free and Open-source software, Forking, Public domain software, freeware, Permissive License, Copyleft License and GNU GPL, and Creative Commons.

Pin It on Pinterest

Share This

Share This

If you liked this post, please share it with your friends.