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:
- Update your local package lists:
sudo apt update - Install the arp-scan package:
sudo apt install -y arp-scan - 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:
- On Fedora, install directly via dnf:
sudo dnf install -y arp-scan - On RHEL, AlmaLinux, or Rocky Linux, enable EPEL first:
sudo dnf install -y epel-release sudo dnf makecache sudo dnf install -y arp-scan - 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:
- Update package index:
apk update - Install the package:
apk add arp-scan - 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:
- Synchronize repository indexes and install:
sudo pacman -Sy arp-scan - 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:
- Assign the
cap_net_rawcapability to the binary:sudo setcap cap_net_raw+ep $(which arp-scan) - Test running the scanner as a standard user:
arp-scan -l