How to Fix bash arp-scan Command Not Found in Minimal Linux

Network administrators, security auditors, and IoT deployment specialists frequently rely on the arp-scan utility to discover, fingerprint, and map active IPv4 hosts on local Ethernet and Wi-Fi subnets using Address Resolution Protocol (ARP) packets. On minimal Linux distributions, lightweight container images (such as Ubuntu Minimal, Debian Slim, or Alpine Linux), attempting to invoke the tool generates the error: bash: arp-scan: command not found. This failure occurs because raw socket ARP discovery utilities are excluded from standard baseline installations to reduce image size.

Install arp-scan on Ubuntu, Debian, and Linux Mint

On Debian-derived distributions, the utility is packaged within primary universe repositories:

  1. Update your local package lists:
    sudo apt update
  2. Install the arp-scan package:
    sudo apt install -y arp-scan
  3. Scan your local subnet to verify functionality:
    sudo arp-scan --localnet

Install arp-scan on RHEL, Rocky Linux, AlmaLinux, and Fedora

Enterprise Linux systems distribute arp-scan through the Extra Packages for Enterprise Linux (EPEL) repository:

  1. On Fedora, install directly via dnf:
    sudo dnf install -y arp-scan
  2. On RHEL, AlmaLinux, or Rocky Linux, enable EPEL first:
    sudo dnf install -y epel-release
    sudo dnf makecache
    sudo dnf install -y arp-scan
  3. Verify the compiled binary:
    arp-scan --version

Install arp-scan on Alpine Linux Docker Containers

Lightweight Docker containers built on Alpine Linux provide arp-scan via the community repository:

  1. Update package index:
    apk update
  2. Install the package:
    apk add arp-scan
  3. When running inside a container, ensure raw socket capabilities are granted:
    docker run --net=host --cap-add=NET_RAW -it alpine

Install on Arch Linux and Manjaro

Arch Linux provides the utility within standard repositories:

  1. Synchronize repository indexes and install:
    sudo pacman -Sy arp-scan
  2. Verify binary availability:
    which arp-scan

Grant Raw Socket Capabilities for Non-Root Execution

By default, arp-scan requires root privileges to craft raw Ethernet frames. If you need standard users to execute scans without full sudo escalation:

  1. Assign the cap_net_raw capability to the binary:
    sudo setcap cap_net_raw+ep $(which arp-scan)
  2. Test running the scanner as a standard user:
    arp-scan -l

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.