You do not need to replace Ubuntu with Kali to run tools such as nmap, sqlmap, or nikto. This page is about installing Kali Linux tools on Ubuntu—individual packages on your existing desktop or server—not installing Kali Linux on Ubuntu 24.04 as an operating system. If you want the full Kali environment with metapackages like kali-linux-default, run Kali in a VM or dedicated machine instead of bolting Kali’s rolling repository onto Ubuntu.
I ran these steps on Ubuntu 25.04: most common pentest tools install with plain sudo apt install, which is what Ask Ubuntu recommends before Snap or Katoolin. Real command output is below so you can compare your terminal.
Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic; amd64.
apt, Snap). Katoolin appears in search results but is legacy on current Ubuntu; Method 3 documents it with warnings, not as the default path.
Prerequisites
- Ubuntu 22.04 LTS, 24.04 LTS, or newer (25.04 tested)—see check Ubuntu version.
- sudo for package installs.
- apt with universe and multiverse enabled (
sudo add-apt-repository universe multiverseon minimal images). - Outbound internet for downloads.
- Optional: Git if you clone tools from upstream repos.
Choose an install method
| Method | Best for | Jump to |
|---|---|---|
| Ubuntu apt (per tool) | Daily driver Ubuntu; stable updates; most readers | Method 1 |
| Snap | Tools missing from apt (for example amass) | Method 2 |
| Katoolin (legacy) | Old tutorials only; not recommended on 24.04+ | Method 3 |
| Kali VM / ISO | Full toolset, metapackages, matching Kali versions | Method 4 |
For hacking tools for Ubuntu without destabilizing the system, install only what you need with Method 1. Proper Installation of Kali linux tools in Ubuntu and Katoolin’s own README warn against enabling Kali repos and running apt upgrade on Ubuntu.
Common Kali tools and Ubuntu package names
Kali and Ubuntu share Debian heritage, but package names differ. You cannot copy sudo apt install amass-common from Kali and expect it on Ubuntu.
| Tool (Kali menu) | Ubuntu install command | Repo pocket (25.04) |
|---|---|---|
| Nmap | sudo apt install nmap |
universe |
| SQLMap | sudo apt install sqlmap |
universe |
| Nikto | sudo apt install nikto |
multiverse |
| John the Ripper | sudo apt install john |
main |
| Aircrack-ng | sudo apt install aircrack-ng |
universe |
| Hydra | sudo apt install hydra |
universe |
| Gobuster | sudo apt install gobuster |
universe — see install Gobuster on Ubuntu |
| Hashcat | sudo apt install hashcat |
universe |
| Wireshark | sudo apt install wireshark |
universe |
| Masscan | sudo apt install masscan |
universe |
| ffuf | sudo apt install ffuf |
universe |
| dirb | sudo apt install dirb |
universe |
| recon-ng | sudo apt install recon-ng |
universe |
| smbmap | sudo apt install smbmap |
universe |
| Amass | sudo snap install amass |
Snap (no amass-common deb) |
Search before you install:
apt-cache search nikto
apt-cache policy sqlmapMethod 1: Install Kali tools from Ubuntu repositories (recommended)
Pick tools by name. One package:
sudo apt update
sudo apt install -y nmapSeveral tools in one command (typical lab setup):
sudo apt install -y nmap sqlmap nikto john aircrack-ng hydraOn Ubuntu 25.04 the tail of that multi-tool install looked like this:
Setting up libwhisker2-perl (2.5-1.2) ...
Setting up liblinear4:amd64 (2.3.0+dfsg-5build1) ...
Setting up nmap-common (7.95+dfsg-2) ...
Setting up nikto (1:2.1.5-3.1) ...
Setting up python3-magic (2:0.4.27-3) ...
Setting up sqlmap (1.9.4-1) ...
Setting up nmap (7.95+dfsg-2) ...
Processing triggers for man-db (2.13.0-1) ...Verify binaries:
nmap --version
sqlmap --version
nikto -VersionNmap version 7.95 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu1.9.4#stableNikto VersionsInstalled packages:
dpkg -l nmap sqlmap nikto | grep '^ii'ii nikto 1:2.1.5-3.1 all web server security scanner
ii nmap 7.95+dfsg-2 amd64 The Network Mapper
ii sqlmap 1.9.4-1 all automatic SQL injection toolExample: install Nmap only
If you followed nmap command in Linux and just need the scanner:
sudo apt install -y nmap
nmap --versionUbuntu’s build may trail Kali’s bleeding-edge build for a given release—that is normal. For coursework or CTF labs, universe versions are usually enough.
Updates and removal
sudo apt update && sudo apt upgrade
sudo apt purge -y nmap sqlmap nikto
sudo apt autoremove -yMethod 2: Install tools via Snap
When apt-cache search finds nothing, check Snap—karel’s Ask Ubuntu answer uses amass as the example.
snap info amass
sudo snap install amass
amass --helpsnap info on Ubuntu 25.04 showed:
name: amass
summary: In-depth DNS Enumeration and Network Mapping.
publisher: Jeff Foley (caffix)
license: Apache-2.0
latest/stable: v3.19.2Subcommands after install include amass intel, amass enum, and amass viz.
nmap exists as a Snap, but apt nmap is simpler on Ubuntu). Prefer apt when both exist so upgrades stay in one package manager.
Method 3: Katoolin (legacy — not recommended)
Katoolin is a Python script from LionSec/katoolin that adds Kali apt repositories and installs tool lists. It was popular in Ubuntu 16.04–20.04 era posts (ubalt.edu walkthrough, Can I install Kali tools on Ubuntu?), but it is a poor fit for Ubuntu 24.04+:
- The script targets Python 2 (
#!/usr/bin/python). - Python 2 is gone from Ubuntu 25.04 (
apt-cache policy python2shows no candidate). - Running under Python 3 fails immediately:
File "katoolin.py", line 8
print "Sorry. This script requires sudo privledges"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?- Ask Ubuntu — proper installation: installing all categories at once (option
0) hangs or errors on missing packages (webshag,sipp, etc.). - Katoolin’s GitHub: remove Kali repositories before updating Ubuntu.
- Ahmed Al-attar’s answer: do not run
apt-get upgradeafter adding Kali repos—it can break GNOME.
If you still use Katoolin on an older Ubuntu with Python 2 available, treat it as a surgical tool:
- Back up sources:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup - Clone and install the script:
sudo apt install -y git
git clone https://github.com/LionSec/katoolin.git
sudo cp katoolin/katoolin.py /usr/bin/katoolin
sudo chmod +x /usr/bin/katoolin- Run
sudo python2 /usr/bin/katoolin(notpython3). - Add repos (menu
1), update (2), install one category at a time—never global0for all tools. - Type
gohometo return to the main menu; useCtrl+Cto exit. - Remove Kali repos when finished:
sudo rm -f /etc/apt/sources.list.d/kali.list
sudo apt updateDo not follow outdated advice to add random 2014 PPAs (wagungs/kali-linux) or cybersec chaos PPAs from old Ask Ubuntu threads—they target Trusty/Utopic and are unsafe today.
Method 4: Use Kali Linux in a VM when you need everything
When you need hundreds of tools with Kali’s versions and menus, install Kali as a guest OS, not as packages on Ubuntu:
- Download the official image from kali.org/get-kali.
- On Kali, install metapackages such as
kali-linux-defaultorkali-tools-webper Kali metapackages documentation:
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y kali-linux-defaultThat workflow matches how Kali is designed. Ubuntu stays your daily driver; Kali lives in VirtualBox, VMware, or Hyper-V for labs.
After installation: quick sanity checks
| Task | Command |
|---|---|
| List your pentest packages | dpkg -l | grep -E 'nmap|sqlmap|nikto|john' |
| Run a safe local Nmap scan | nmap -sn 127.0.0.1 |
| SQLMap help | sqlmap -h |
| See if Kali repos leaked in | grep -r kali /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null |
If the last command prints kali-rolling lines you did not intend to keep, remove that file and run sudo apt update.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
E: Unable to locate package amass-common |
Kali-only package name on Ubuntu | Use sudo snap install amass or build from OWASP releases |
apt upgrade breaks desktop after Katoolin |
Kali repos still enabled | Remove Kali sources; restore sources.list.backup; avoid full-upgrade until clean |
Katoolin SyntaxError on print |
Python 3 running Python 2 script | Do not use Katoolin on 24.04+; use Method 1 |
Unable to locate package webshag |
Stale Katoolin tool list | Install tools individually from Ubuntu apt; skip missing Kali-only names |
| Tool version older than Kali | Ubuntu stable vs Kali rolling | Accept universe version, use Snap, or run tool inside Kali VM |
gpg: keyserver receive failed adding Kali key |
Network or deprecated apt-key |
Prefer per-tool Ubuntu install; if you must add Kali key, use signed-by keyring method and remove after |
References
- Ask Ubuntu — install Kali tools with apt (amass example)
- Ask Ubuntu — proper installation of Kali tools / Katoolin warnings
- Ask Ubuntu — can I install Kali tools on Ubuntu?
- Kali Linux metapackages
- Katoolin GitHub repository
- apt command in Linux
- nmap command in Linux
Summary
Install Kali tools on Ubuntu with sudo apt install and the Ubuntu package name—nmap, sqlmap, nikto, john, and dozens of others live in universe or multiverse without adding a Kali repository to Ubuntu. That is the path that matches modern Ask Ubuntu guidance and keeps apt upgrade safe.
Use Snap when apt has no package (for example amass). Treat Katoolin as a legacy keyword: it targets Python 2, breaks easily if you install everything at once, and conflicts with Ubuntu when Kali repos stay enabled. If you truly need the full Kali stack, run Kali in a VM and install metapackages there—do not confuse that with keeping Ubuntu and searching install kali linux on ubuntu 24.04 on this page.

