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
# 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-ossThere 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
- Short version
- Step 1 - Downloading the VSCode package
- Step 2 - Install VSCode on Kali Linux
- Step 3 - Starting VSCode
- Step 4 - Update VSCode on Kali Linux
- Alternative: Install Code - OSS from the Kali Repository
- Alternative: Add the Microsoft Repository Manually
- FAQ
- Why do I get "E: Unsupported file ./code_....deb given on commandline"?
- What is the difference between code-oss and VS Code?
- How do I update VS Code on Kali Linux?
- Does VS Code run on Kali Linux ARM?
- Conclusion
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.

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.
cd ~/Downloads
sudo apt install ./code_*.debThe 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.

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.

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.
sudo apt update -y && sudo apt upgrade -yThis 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:
sudo apt update
sudo apt install code-ossStart 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:
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 codeFAQ
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
36 thoughts on “Install VSCode on Kali Linux – Easiest Way”
Comments are closed. I keep the discussion here because the answers still help.
More posts
All Cyber Security


Thank you so much! That is the first time that I've successfully installed and actually used Visual Studio on Kali.
May you live longer. I find this *very useful*. It's so far the easiest method I have found.
thanks alot
thanks man
E: Unsupported file ./code_1.76.2-1678817801_amd64.deb given on commandline
open download folder then in console type: sudo apt instal (and just move instalation file behind word instal and hit enter)
I have the same problème
Problem solve
Just use kali linux X64
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
sorry, but i have problem to install this package :(
Very easy thank
Thanks my friend its really helpful to me.You are a legend
You're welcome! 😊
wow thanks a lot bro
really helpful
Thank you bro :)
Thank you
You are most welcome!
THANKS A LOTTTTTT
You bet!
Stefan, i keep trying and nothing works keep E: unsupported
thanks any help will be great
luc
I like your style! Thanks for the content!
Thank you so much. Appreciated!
Thanks for this post
Just easily explained it !!
Thank you my friend!
Try like this
sudo apt install ./code_1.65.2-1646927742_amd64.deb
dont forget put this ./
Thank you so much bro
very comprehensive and easy steps
Thanks!!
Thank you very much
You're welcome! :)
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🤷♀️
mine didn't work, please help e find another way
niceees
Very easy to follow steps. It's very helpful. Thanks a lot.
very easy when following the steps you describe. Really
thanks!
thank it's very helpful