# 使用 Homebrew, apk, apt, MacPorts, Nix, pacman, zypper 安装 bettercap

查看 bettercap 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:bettercap
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bettercap
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bettercap
```

  证据: MacPorts ports tree: net/bettercap/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add bettercap
```

  证据: Alpine Linux edge package indexes: bettercap from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install bettercap
```

  证据: Debian stable package indexes: bettercap from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#bettercap
```

  证据: nixpkgs package indexes: pkgs/by-name/be/bettercap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S bettercap
```

  证据: Arch Linux sync databases: bettercap from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install bettercap
```

  证据: openSUSE Tumbleweed package metadata: bettercap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:bettercap
- **软件包管理器:** Homebrew
- **版本:** 2.41.7
- **来源摘要:** Swiss army knife for network attacks and monitoring
- **主页:** <https://www.bettercap.org/>
- **仓库:** <https://github.com/bettercap/bettercap>
- **最后更新:** 2026-07-15T21:02:52-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- bettercap (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.41.7
## 项目历史与用法

bettercap is a Go-based network reconnaissance and attack framework packaged as a command-line tool for security researchers, red teamers, and reverse engineers. Its official description frames it as an all-in-one toolkit for Wi-Fi, Bluetooth Low Energy, HID, CAN-bus, IPv4, and IPv6 reconnaissance and MITM work.

### 项目历史

The current public repository was created in January 2018 and hosts the Go implementation, documentation links, caplets, modules, tests, and release automation for bettercap 2.x. The project replaced the older single-purpose idea of a LAN MITM helper with a modular framework covering wireless and wired network attack surfaces.

Official release tags show the 2.x line continuing through regular maintenance and feature releases, including v2.40.0 in September 2024, v2.41.0 in January 2025, and v2.41.7 in May 2026.

### 采用历史

bettercap became a common package-manager install for offensive-security labs because it combines sniffing, spoofing, Wi-Fi handshakes, BLE enumeration, packet/protocol proxies, and a REST/web UI under one executable. Homebrew, Debian/Ubuntu, Arch, Alpine, Nix, MacPorts, and openSUSE packaging in the input reflects that cross-platform adoption.

The GitHub repository's large star and fork counts, Docker image badge, and active release stream indicate that bettercap is used beyond macOS packaging: it is a standard tool people expect to be available in disposable lab machines, containers, and security-focused Unix environments.

### 使用方式

Users typically run bettercap interactively or with caplets to discover hosts, inspect traffic, run spoofers, capture Wi-Fi handshakes, enumerate BLE devices, or script network experiments. Its official docs emphasize an interactive session workflow and module-driven operation rather than a single fire-and-forget scan command.

Because the tool performs real attack and monitoring functions, its practical use belongs in authorized security testing, lab networks, red-team exercises, and research settings.

### 为什么软件包爱好者会关心

bettercap is package-nerd interesting because it is one of the few security CLI packages that collapses many historically separate tools into one Go binary with modules, a web UI, REST API, caplets, and packaged defaults. It sits at the intersection of classic Unix networking tools, wireless security suites, and modern self-contained Go distribution.

For Homebrew-style package history, bettercap also illustrates how offensive-security tooling moved from language/runtime-heavy installs toward portable binaries that can be installed quickly on a laptop, container, or lab host and then extended with scripts and modules.

### 时间线

- 2018: Current bettercap/bettercap GitHub repository created for the Go-based 2.x project.
- 2024: v2.40.0 released, showing the mature 2.x line still receiving updates.
- 2025: v2.41.0 released.
- 2026: v2.41.7 published in May, with repository activity continuing in June.

### Related projects

- Related tools include Wireshark and tcpdump for packet inspection, aircrack-ng for Wi-Fi security workflows, mitmproxy for programmable proxying, nmap for network discovery, and ettercap as an older MITM-oriented tool whose niche bettercap partly modernized.

### 来源

- <https://api.github.com/repos/bettercap/bettercap>
- <https://api.github.com/repos/bettercap/bettercap/releases>
- <https://raw.githubusercontent.com/bettercap/bettercap/master/README.md>
- source_facts.package-manager


## 安全说明

network interception and offensive security tool.

- **Geiger 风险:** red / 高
- network interception and offensive security tool


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/bettercap.env
## 其他软件包管理器记录

- Debian apt - bettercap - 2.33.0-1+b9: normalized package name match | Debian stable package indexes: bettercap from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Complete, modular, portable and easily extensible MITM framework | https://www.bettercap.org
- Nix - bettercap: normalized package name match | nixpkgs package indexes: pkgs/by-name/be/bettercap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bettercap - 2.32.0-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: bettercap from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Complete, modular, portable and easily extensible MITM framework | https://www.bettercap.org
- apk - bettercap - 2.41.7-r1: normalized package name match | Alpine Linux edge package indexes: bettercap from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | The Swiss Army knife for 802.11, BLE, HID, CAN-bus, IPv4 and IPv6 networks reconnaissance and MITM attacks. | https://www.bettercap.org/
- apk - bettercap-doc - 2.41.7-r1: normalized package name match | Alpine Linux edge package indexes: bettercap-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | The Swiss Army knife for 802.11, BLE, HID, CAN-bus, IPv4 and IPv6 networks reconnaissance and MITM attacks. (documentation) | https://www.bettercap.org/
- pacman - bettercap - 2.41.7-2: normalized package name match | Arch Linux sync databases: bettercap from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Swiss army knife for network attacks and monitoring | https://github.com/bettercap/bettercap
- zypper - bettercap - 2.41.7-1.4: normalized package name match | openSUSE Tumbleweed package metadata: bettercap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Swiss army knife for network attacks and monitoring | https://www.bettercap.org/
- MacPorts - bettercap: normalized package name match | MacPorts ports tree: net/bettercap/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/bettercap.yml](https://github.com/mxcl/pkgdb/blob/main/combined/bettercap.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
