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

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

## 安装

```sh
sudo av install brew:iftop
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install iftop
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install iftop
```

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

### Linux

- apk (92%):

```sh
sudo apk add iftop
```

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

- Debian apt (92%):

```sh
sudo apt install iftop
```

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

- dnf (92%):

```sh
sudo dnf install iftop
```

  证据: Fedora Rawhide package metadata: iftop from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#iftop
```

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

- pacman (92%):

```sh
sudo pacman -S iftop
```

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

- zypper (92%):

```sh
sudo zypper install iftop
```

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

## 软件包事实

- **软件包键:** brew:iftop
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/iftop>
- **版本:** 1.0pre4
- **来源摘要:** Display an interface's bandwidth usage
- **主页:** <https://pdw.ex-parrot.com/iftop/>
- **上游文档:** <https://pdw.ex-parrot.com/iftop/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://pdw.ex-parrot.com/iftop/download/iftop-1.0pre4.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- iftop (cli)
- iftop (别名)

## macOS 提供的库

- libpcap
- ncurses

## 安装行为

- post-install 钩子: 未定义
- 注意事项: iftop requires root privileges so you will need to run `sudo iftop`. You should be certain that you trust any software you grant root privileges.
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.0pre4
- 本地数据: OK
- 上游仓库: https://pdw.ex-parrot.com/iftop/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

iftop is a terminal bandwidth monitor by Paul Warren and contributors. Its project page summarizes the idea directly: it does for network usage what top does for CPU usage, listening on an interface and showing bandwidth by host pairs.

It became a familiar admin tool because it answers an immediate operational question: which conversations are using the link right now?

### 项目历史

The upstream ChangeLog records the first release as 0.1 on 2002-03-29. Early 2002 releases quickly added network-boundary analysis, cumulative totals, PPP support, Linux cooked sockets, port display, FreeBSD support, online help, service resolution controls, and bandwidth-in-bytes display.

By 2003 the tool had acquired autoconf/automake, better interface auto-selection, cumulative line totals, Solaris DLPI support, Mac OS X build fixes, config-file support, selectable averages, and command-line controls for port resolution.

Version 0.17 in 2006 added VLAN support and multiple portability fixes. Later 1.0 pre-release work added IPv6 support, text output mode, PFLOG support, many downstream portability fixes, and contributions routed through Debian, Fedora, Red Hat, and other users.

### 采用历史

iftop spread widely through Unix and Linux package collections because it pairs libpcap packet capture with a top-like curses interface. The supplied metadata lists Alpine, Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE-style package names.

The project page also maintained a mailing list, public archives, pre-release tarballs, and a git repository, which helped distribution maintainers track patches even when stable releases were infrequent. Homebrew's formula notes that distributions package a 1.0 pre-release because upstream movement slowed after the 2014 pre-release.

### 使用方式

Users usually run iftop on a selected interface to see bandwidth grouped by source and destination host pairs. The UI supports options and interactive toggles for hostnames, ports, sorting, totals, averages, filters, display scaling, and text output.

Because it uses libpcap, iftop often needs elevated privileges or packet-capture permissions. It is most useful during incident response, capacity checks, and quick diagnosis of unexpected traffic.

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

iftop is one of the canonical small admin packages: a memorable name, a single job, a curses UI, libpcap underneath, and years of downstream patches keeping it buildable across systems.

It also occupies the sweet spot between tcpdump and full network-monitoring suites. Package it once, run it over SSH, and get an immediate visual answer without setting up a daemon or dashboard.

### 时间线

- 2002-03-29: 0.1 first release.
- 2002-10-22: 0.9 adds FreeBSD support, online help, service toggles, and bandwidth-in-bytes display.
- 2003-01-08: 0.11 adds autoconf/automake and improved interface auto-selection.
- 2003-11-10: 0.15 adds config-file support and display controls.
- 2006-02-12: 0.17 adds VLAN support and portability fixes.
- 2014-01-19: 1.0pre4 is the pre-release packaged by Homebrew and other distributions.

### Related projects

- top is the direct interface analogy named by upstream.
- tcpdump, libpcap, pcap, ncurses, ntop, bmon, nload, iptraf-ng, and ifstat are adjacent command-line or terminal network-monitoring tools.

### 来源

- <https://code.blinkace.com/pdw/iftop>
- <https://code.blinkace.com/pdw/iftop/-/raw/master/ChangeLog>
- <https://formulae.brew.sh/formula/iftop>
- <https://pdw.ex-parrot.com/iftop/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** iftop
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Debian apt - iftop - 1.0~pre4-9+b1: normalized package name match | Debian stable package indexes: iftop from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | displays bandwidth usage information on an network interface | http://www.ex-parrot.com/~pdw/iftop/
- Nix - iftop: normalized package name match | nixpkgs package indexes: pkgs/by-name/if/iftop/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - iftop - 1.0~pre4-9build2: normalized package name match | Ubuntu 24.04 LTS package indexes: iftop from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | displays bandwidth usage information on an network interface | http://www.ex-parrot.com/~pdw/iftop/
- apk - iftop - 1.0_pre4-r0: normalized package name match | Alpine Linux edge package indexes: iftop from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool to display bandwidth usage on an interface | https://www.ex-parrot.com/~pdw/iftop/
- apk - iftop-doc - 1.0_pre4-r0: normalized package name match | Alpine Linux edge package indexes: iftop-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool to display bandwidth usage on an interface (documentation) | https://www.ex-parrot.com/~pdw/iftop/
- dnf - iftop - 1.0-0.39.pre4.fc45: normalized package name match | Fedora Rawhide package metadata: iftop from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Command line tool that displays bandwidth usage on an interface | http://www.ex-parrot.com/~pdw/iftop/
- pacman - iftop - 1.0pre4-6: normalized package name match | Arch Linux sync databases: iftop from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Display bandwidth usage on an interface | http://www.ex-parrot.com/~pdw/iftop/
- zypper - iftop - 0.99.4-11.5: normalized package name match | openSUSE Tumbleweed package metadata: iftop from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Real-Time Interface Bandwidth Usage | https://www.ex-parrot.com/~pdw/iftop/
- MacPorts - iftop: normalized package name match | MacPorts ports tree: net/iftop/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [bmon](https://pkg.so/zh-hans/brew/bmon/) - Shares pkgdb curated category or tags: bandwidth, cli, interfaces, network-monitoring, networking.
- [ifstat](https://pkg.so/zh-hans/brew/ifstat/) - Shares pkgdb curated category or tags: bandwidth, cli, interfaces, network-monitoring, networking.
- [bandwhich](https://pkg.so/zh-hans/brew/bandwhich/) - Shares pkgdb curated category or tags: bandwidth, cli, networking, terminal.
- [nethogs](https://pkg.so/zh-hans/brew/nethogs/) - Shares pkgdb curated category or tags: bandwidth, cli, network-monitoring, networking.
- [nload](https://pkg.so/zh-hans/brew/nload/) - Shares pkgdb curated category or tags: bandwidth, cli, network-monitoring, networking.
- [prettyping](https://pkg.so/zh-hans/brew/prettyping/) - Shares pkgdb curated category or tags: cli, network-monitoring, networking, terminal.
- [vnstat](https://pkg.so/zh-hans/brew/vnstat/) - Shares pkgdb curated category or tags: bandwidth, cli, network-monitoring, networking.
- [slurm](https://pkg.so/zh-hans/brew/slurm/) - Shares pkgdb curated category or tags: cli, network-monitoring, networking, terminal.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
