Packages
Many Linux distributions package bpftool, albeit some of them like Ubuntu integrate it to broader packages.
Warning
Distributions may not enable all bpftool features when they compile the binary. Support for the disassembler for JIT-compiled programs, or support for profiling BPF programs, may not be available from the version contained in your distribution’s package.
See bpftool’s build features for details.
Alpine
Alpine Linux has a bpftool package:
# apk add bpftool
Debian
Debian has a bpftool package:
# apt install bpftool
Debian is one of these distributions shipping a binary that does not contain the disassembler for JIT-compiled eBPF code.
Fedora
Fedora has a bpftool package:
# dnf install bpftool
Ubuntu
Ubuntu ships bpftool via the Linux tools:
# apt install linux-tools-common linux-tools-generic
Ubuntu is one of these distributions shipping a binary that does not contain the disassembler for JIT-compiled eBPF code.
Others
New packages
If you’re looking into packaging bpftool, please take a look at the FAQ.