Install VSCode on Kali Linux – Easiest Way

The easiest way to install VSCode on Kali Linux is to download Microsoft’s .deb package from code.visualstudio.com and run sudo apt install ./code_*.deb in your Downloads folder. Say yes when it offers to add Microsoft’s apt repository, and sudo apt upgrade keeps VS Code updated. Kali also ships an open source build: sudo apt install code-oss.

Short version

Terminalbash
# Microsoft VS Code, after downloading the .deb from code.visualstudio.com/download
cd ~/Downloads
sudo apt install ./code_*.deb
# or the open source build from the Kali repository
sudo apt install code-oss

There are a lot of different code editors out there, but lately, many developers have found a liking for Visual Studio Code. I personally switched over to VSCode from Atom and Sublime a while ago and I am not looking back. VSCode is such an awesome piece of software (and it’s completely free, too), that I don’t need to use anything else for my daily needs.

Should you also happen to need assistance in installing Kali Linux on Windows - I got just the guide for you.

👀 This Tutorial has some related Articles!
👉 How to get started in Cyber Security - The Complete Guide 👉 How to get started with Bug Bounties 👉 Terminal Customization Series 👉 Best Ethical Hacking Books 👉 Download Kali Linux Safe & Easy 👉 Best Ethical Hacking Tools 👉 Install VSCode on Kali Linux 👉 Dual Boot Kali Linux with Windows 👉 Install Kali Linux on VirtualBox – Complete Beginner Guide 👉 Top Things to do after installing Kali Linux 👉 WiFi Adapter for Kali Linux – The Ultimate Guide 👉 Nmap Beginner Guide Series 👉 Metasploit Tutorial Series 👉 Burp Suite Beginner Guide

Table of Contents

Step 1 - Downloading the VSCode package

The easiest way to install VSCode on Kali Linux is by downloading the VSCode deb. package and installing it via Apt. During the install, the package offers to add Microsoft’s apt repository and signing key, which is what keeps VSCode updated through apt.

On your Kali machine, head over to the VSCode Downloads Page and select the .deb file to install VSCode. Pick the x64 build for a normal PC or VM. If you run Kali on ARM, for example on a Raspberry Pi or in a VM on an Apple Silicon Mac, pick the Arm64 build instead.

Downloading VSCode on Kali Linux
Downloading VSCode on Kali Linux

The file will now be saved inside your Downloads folder.

Step 2 - Install VSCode on Kali Linux

Once downloaded, we need to install VSCode on Kali Linux. Gladly, that’s very easy now. Open up your Kali Terminal by clicking on the icon and navigate to the Downloads folder.

Terminalbash
cd ~/Downloads
sudo apt install ./code_*.deb

The real file name contains the version number, for example code_<version>-<build>_amd64.deb. The ./ in front matters: without it, apt looks for a package by that name in its repositories instead of the file in your folder.

Install VSCode on Kali Linux
Install VSCode on Kali Linux

When apt asks whether to add the Microsoft apt repository, choose Yes. The package then sets up the repository and its signing key for you, so there is no manual GPG work.

Step 3 - Starting VSCode

And that’s it already! You can now start VSCode on Kali Linux via the App menu, or by typing code in a terminal.

Install VSCode on Kali Linux
Install VSCode on Kali Linux

Step 4 - Update VSCode on Kali Linux

VSCode usually notifies you if an update is available while using the app, but since we installed it in a way that also installed the apt repository, we can simply update VSCode by using apt.

Terminalbash
sudo apt update -y && sudo apt upgrade -y

This will also bring VSCode to the latest version.

Alternative: Install Code - OSS from the Kali Repository

Kali ships its own open source build of VSCode, packaged as code-oss. It needs no download and no extra repository:

Terminalbash
sudo apt update
sudo apt install code-oss

Start it with code-oss. On Kali, typing code also starts code-oss after a short notice. This build is made from Microsoft’s open source code, but it is not Microsoft’s product, and Microsoft only allows its own VS Code builds to use the Visual Studio Marketplace. If you depend on Microsoft extensions, install the .deb from Step 1 instead.

Alternative: Add the Microsoft Repository Manually

If you set up Kali with scripts or without a desktop, you can add Microsoft’s repository by hand and install the code package. These are the commands from Microsoft’s Linux setup guide:

Terminalbash
sudo apt install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft.gpg
sudo tee /etc/apt/sources.list.d/vscode.sources > /dev/null <<'EOF'
Types: deb
URIs: https://packages.microsoft.com/repos/code
Suites: stable
Components: main
Architectures: amd64,arm64,armhf
Signed-By: /usr/share/keyrings/microsoft.gpg
EOF
sudo apt update
sudo apt install code

FAQ

Why do I get “E: Unsupported file ./code_….deb given on commandline”?

apt prints this when it can’t find the file at the path you gave, or when the file is not a valid .deb. Run ls ~/Downloads/*.deb to check the exact name, then run the install from that folder with ./ in front of the file name. If the download was interrupted, download the .deb again.

What is the difference between code-oss and VS Code?

Both come from the same open source code. Microsoft’s VS Code adds Microsoft branding and features and uses a Microsoft product license, while Kali’s code-oss is built straight from the MIT-licensed source. Microsoft’s extension marketplace is only licensed for Microsoft’s own VS Code builds, so some extensions won’t be available in code-oss.

How do I update VS Code on Kali Linux?

If you installed the .deb and accepted the Microsoft repository, run sudo apt update && sudo apt upgrade. The code-oss package updates the same way from the Kali repository. You don’t need to download a new .deb for each release.

Does VS Code run on Kali Linux ARM?

Yes. Microsoft builds VS Code for arm64 and armhf (32-bit ARM) as well as x64, so pick the matching download on a Raspberry Pi or an Apple Silicon VM. Kali’s code-oss package is also built for arm64.

Conclusion

And there you have it. That’s as easy as it gets. Now you are able to use VSCode in Kali Linux. I really enjoy working with VSCode because of its ease of use and because of its extensive extension library.

There are extensions for almost anything you can think of, from colored bracket pairs to syntax auto-completion et cetera. On top of that, it runs really fast and had never even once crashed on me. It is also fully integrated with Git, making it very easy to work with your Git repository.

Once you get used to using Virtual Studio Code, you probably will not go back to your old editor (except, your old editor is VIM of course!), but that’s a whole topic on its own.

Check out some more related tutorials: Install WSL 2 on Windows - Complete Beginner Guide Customizing WSL 2 and Windows Terminal Install Kali Linux in Dual Boot with Windows The BEST Hacking Books to learn Hacking! Top Things to do after Installing Kali Linux

whoami

Stefan founded Ceos3c in 2016 and has spent a decade teaching cybersecurity, Linux, and web development through hands-on tutorials. He builds and ships real products while sharing his journey: ProofSwap.me, XPMetric.com, and EasyEarningsTracker.com.

More about me

36 thoughts on “Install VSCode on Kali Linux – Easiest Way”

  1. Thank you so much! That is the first time that I've successfully installed and actually used Visual Studio on Kali.

  2. May you live longer. I find this *very useful*. It's so far the easiest method I have found.

    1. open download folder then in console type: sudo apt instal (and just move instalation file behind word instal and hit enter)

    2. use this command :- sudo dpkg -i ./code_1.95.1-1730355339_amd64.deb
      sudo apt install ./code_1.95.1-1730355339_amd64.deb
      sudo apt --fix-broken install

  3. Thanks it worked..
    I downloaded the deb package like a week ago,had difficulty finding an "Install" option😂.. terminal is key with linux.
    You should do more linux related tutorials🤷‍♀️

Comments are closed. I keep the discussion here because the answers still help.