How to Install Kali Linux Tools on Ubuntu

Install Kali Linux tools on Ubuntu with sudo apt install for nmap, sqlmap, nikto, and other hacking tools in Ubuntu repositories. Use Snap when apt has no package. Katoolin is legacy on modern Ubuntu—use a Kali VM when you need the full toolset.

Published

Updated

Read time 8 min read

Reviewed byDeepak Prasad

Install Kali Linux tools on Ubuntu banner with terminal apt install commands and security icons

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.

WARNING
Use security tools only on systems and networks you own or have written permission to test. Unauthorized scanning or exploitation is illegal in most jurisdictions.
IMPORTANT
Intent check: Queries like install kali linux on ubuntu mean installing the Kali OS (VM/ISO)—out of scope here. This guide covers Kali tool install commands on Ubuntu (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 multiverse on 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:

bash
apt-cache search nikto
apt-cache policy sqlmap

Pick tools by name. One package:

bash
sudo apt update
sudo apt install -y nmap

Several tools in one command (typical lab setup):

bash
sudo apt install -y nmap sqlmap nikto john aircrack-ng hydra

On Ubuntu 25.04 the tail of that multi-tool install looked like this:

text
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:

bash
nmap --version
sqlmap --version
nikto -Version
text
Nmap version 7.95 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
text
1.9.4#stable
text
Nikto Versions

Installed packages:

bash
dpkg -l nmap sqlmap nikto | grep '^ii'
text
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 tool

Example: install Nmap only

If you followed nmap command in Linux and just need the scanner:

bash
sudo apt install -y nmap
nmap --version

Ubuntu’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

bash
sudo apt update && sudo apt upgrade
sudo apt purge -y nmap sqlmap nikto
sudo apt autoremove -y

Method 2: Install tools via Snap

When apt-cache search finds nothing, check Snap—karel’s Ask Ubuntu answer uses amass as the example.

bash
snap info amass
sudo snap install amass
amass --help

snap info on Ubuntu 25.04 showed:

text
name:      amass
summary:   In-depth DNS Enumeration and Network Mapping.
publisher: Jeff Foley (caffix)
license:   Apache-2.0
latest/stable:    v3.19.2

Subcommands after install include amass intel, amass enum, and amass viz.

HINT
Some tools also publish Snaps under different names (nmap exists as a Snap, but apt nmap is simpler on Ubuntu). Prefer apt when both exist so upgrades stay in one package manager.

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 python2 shows no candidate).
  • Running under Python 3 fails immediately:
text
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 upgrade after 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:

  1. Back up sources: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
  2. Clone and install the script:
bash
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
  1. Run sudo python2 /usr/bin/katoolin (not python3).
  2. Add repos (menu 1), update (2), install one category at a time—never global 0 for all tools.
  3. Type gohome to return to the main menu; use Ctrl+C to exit.
  4. Remove Kali repos when finished:
bash
sudo rm -f /etc/apt/sources.list.d/kali.list
sudo apt update

Do 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:

bash
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y kali-linux-default

That 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


Summary

Install Kali tools on Ubuntu with sudo apt install and the Ubuntu package namenmap, 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.


Frequently Asked Questions

1. How do I install Kali Linux tools on Ubuntu?

Search Ubuntu first: apt-cache search toolname, then sudo apt install nmap sqlmap nikto (or each tool you need). Many Kali tools ship in Ubuntu universe or multiverse. For tools like amass with no apt package, try sudo snap install amass. Do not add the full kali-rolling repository to a daily-driver Ubuntu desktop.

2. Can I run sudo apt install amass-common on Ubuntu like Kali?

No. Package names on Kali (for example amass-common) are Debian/Kali-specific and are not in Ubuntu archives. On Ubuntu install amass with sudo snap install amass, or use the OWASP Amass release binaries. Prefer Ubuntu or Snap package names, not Kali metapackage names.

3. Is Katoolin safe to use on Ubuntu 24.04 or 25.04?

Katoolin is unmaintained Python 2 code that adds Kali apt sources and can break apt upgrade or GNOME if misused. On Ubuntu 25.04 python2 is not even in the repositories. Use apt per-tool installs instead; treat Katoolin as historical reference only unless you are on an older release and accept the risk.

4. Should I add the Kali Linux repository to Ubuntu?

Only as a last resort for one specific .deb, then remove the repo immediately. Mixing kali-rolling with Ubuntu causes dependency conflicts, failed upgrades, and replaced core libraries per Ask Ubuntu and the Katoolin GitHub warning. Never run sudo apt full-upgrade while Kali sources are enabled.

5. How do I install all Kali tools on Ubuntu at once?

You cannot replicate kali-linux-default metapackages on Ubuntu safely. Kali metapackages such as kali-tools-web exist only on Kali per kali.org docs. For hundreds of tools, run Kali in a VM, WSL, or dual boot—not Katoolin option 0 on a production Ubuntu install.

6. What is the difference between installing Kali Linux and installing Kali tools on Ubuntu?

Installing Kali Linux means using Kali as the operating system (installer ISO or VM). This guide installs individual security tools on Ubuntu so you keep your desktop while adding nmap, sqlmap, or similar. Searching install kali linux on ubuntu 24.04 is a different task—use a VM or official Kali image for that.

7. Which Kali tools are available in Ubuntu repositories?

On Ubuntu 25.04 tested here: nmap, sqlmap, nikto, john, aircrack-ng, hydra, gobuster, hashcat, masscan, wireshark, dirb, ffuf, recon-ng, smbmap, and more in universe or multiverse. Run apt-cache search keyword before adding foreign repositories.

8. How do I remove Kali repositories after using Katoolin?

Delete /etc/apt/sources.list.d/kali.list or kali entries in sources.list, run sudo rm /etc/apt/trusted.gpg.d/kali if present, sudo apt-key del on any Kali key IDs from apt-key list, then sudo apt update. Restore from /etc/apt/sources.list.backup if you made one first.
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with more than 15 years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive …