Skip to content

Installing bandwhich

Outcome: bandwhich is on your machine and answers to its name — and you know that the version check passing is only half the install, because this tool also needs a privilege most tools never ask for. That half is the whole of the next chapter; this one gets the program onto the disk.

The route the lab took

The lab downloaded the release archive for Linux from the project's GitHub releases page — bandwhich-v0.23.1-x86_64-unknown-linux-gnu.tar.gz — unpacked it, and ran the bandwhich binary inside. No system-wide install, nothing else touched: the binary sat in the lab's scratch folder and was called from there. The archive also carries shell completions and a manual page under assets/. On your own machine you would move the binary somewhere on your path, such as /usr/local/bin or ~/.local/bin.

The check that any install must pass is one command:

bandwhich --version

The lab's answer is the first line of transcript examples/transcripts/t00-version-help.txt:

bandwhich 0.23.1

The same transcript records the binary's SHA-256 and the full --help text, so every flag this guide names can be checked against the exact build the lab ran. Your version number will likely be newer. What matters is that the command answers instead of erroring.

The package and cargo routes

Most readers will install bandwhich another way, and the project documents each route:

  • Cargo (the Rust package manager): cargo install bandwhich. This builds from source, so it needs a working Rust toolchain and takes a while.
  • Arch Linux: a bandwhich package in the official repositories.
  • macOS: brew install bandwhich with Homebrew.
  • Nix, Void, FreeBSD, Fedora (via a COPR repository), and others are listed in the project's README.

At the time of writing there is no bandwhich package in the Debian or Ubuntu repositories — the lab checked (apt-cache search bandwhich finds nothing), so on those systems the release archive or cargo is the route. These package routes are described from the project's documentation, not run by this guide's lab, and are labelled documented-only in criteria.md. The lab verified the program itself; the wrapping it arrives in varies by system, and the version check above is how you confirm your wrapping worked.

One warning before the next chapter

Run bandwhich now, without thinking, and on most machines you will not get the display. You will get a refusal:

Error:

lo:
    Insufficient permissions to listen on network interface(s). ...

That is not a broken install. It is the tool telling you the truth about what it is: a packet sniffer, and sniffing is privileged. The lab met that exact message in four different situations (transcript t01), including one machine state where even the system administrator's account could not grant the privilege — a useful reminder that "just use sudo" is a sentence with fine print. The next chapter explains what the privilege is, the two honest ways to grant it, and how to check which situation you are in.

Check: bandwhich --version answers with a version, and you can say which route your copy arrived by — and you are not surprised that running it plainly may refuse. The refusal is the next chapter's subject, not an error in yours.