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

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

## 安装

```sh
sudo av install brew:mtr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mtr
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mtr
```

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

### Linux

- apk (92%):

```sh
sudo apk add mtr
```

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

- Debian apt (92%):

```sh
sudo apt install mtr
```

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

- dnf (92%):

```sh
sudo dnf install mtr
```

  证据: Fedora Rawhide package metadata: mtr 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#mtr
```

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

- pacman (92%):

```sh
sudo pacman -S mtr
```

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

- zypper (92%):

```sh
sudo zypper install mtr
```

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

## 软件包事实

- **软件包键:** brew:mtr
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mtr>
- **版本:** 0.96
- **来源摘要:** 'traceroute' and 'ping' in a single tool
- **主页:** <https://www.bitwizard.nl/mtr/>
- **仓库:** <https://github.com/traviscross/mtr>
- **上游文档:** <https://www.bitwizard.nl/mtr/>
- **许可证:** GPL-2.0-only AND BSD-3-Clause AND LGPL-2.0-only
- **源码归档:** <https://github.com/traviscross/mtr/archive/refs/tags/v0.96.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mtr (cli)
- mtr-packet (cli)
- mtr (别名)
- mtr-packet (别名)

## 依赖

- jansson

## 构建依赖

- autoconf
- automake
- pkgconf

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.96
- 本地数据: OK
- 上游仓库: https://github.com/traviscross/mtr
- 检测到的最新版本: v0.96 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

mtr began as Matt Kimball's network diagnostic program and was later maintained by Roger Wolff at BitWizard; the BitWizard history page says Wolff took over maintenance in October 1998. The name is commonly expanded as My Traceroute, preserving its origin as Matt's Traceroute while emphasizing the combined traceroute-and-ping behavior that made the tool distinctive.

### 项目历史

Technically, mtr repeatedly probes the path from the local host to a destination with increasing time-to-live values, discovers intermediate hops from router responses, and prints running latency and loss statistics for each hop. The official README warns that routers can suppress or rate-limit ICMP responses, so apparent loss at an intermediate hop does not automatically mean forwarded traffic is being dropped there. The project also splits privileged packet work into mtr-packet, which must have raw-socket privileges on Unix-like systems.

### 使用方式

Its adoption is broad because it turns an intermittent network path into a live table that operators can watch while troubleshooting. Distribution packaging for Unix-like systems, a GitHub-maintained upstream, WSL instructions for Windows users, and long-standing Homebrew/Linux packages place it alongside ping, traceroute, and pathping-style tools, but with the advantage of continuous per-hop statistics.

### 来源

- <https://formulae.brew.sh/formula/mtr>
- <https://github.com/traviscross/mtr>
- <https://packages.debian.org/sid/mtr>
- <https://www.bitwizard.nl/mtr/>


## 安全说明

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:** mtr
- **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 - mtr - 0.95-1.1+b1: normalized package name match | Debian stable package indexes: mtr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Full screen ncurses and X11 traceroute tool | https://www.bitwizard.nl/mtr/
- Debian apt - mtr-tiny - 0.95-1.1+b1: normalized package name match | Debian stable package indexes: mtr-tiny from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Full screen ncurses traceroute tool | https://www.bitwizard.nl/mtr/
- Nix - mtr: normalized package name match | nixpkgs package indexes: pkgs/by-name/mt/mtr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mtr - 0.95-1.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: mtr from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Full screen ncurses and X11 traceroute tool | https://www.bitwizard.nl/mtr/
- Ubuntu apt - mtr-tiny - 0.95-1.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: mtr-tiny from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Full screen ncurses traceroute tool | https://www.bitwizard.nl/mtr/
- apk - mtr - 0.96-r2: normalized package name match | Alpine Linux edge package indexes: mtr from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Full screen ncurses traceroute tool | https://www.bitwizard.nl/mtr/
- apk - mtr-bash-completion - 0.96-r2: normalized package name match | Alpine Linux edge package indexes: mtr-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completion for mtr | https://www.bitwizard.nl/mtr/
- apk - mtr-doc - 0.96-r2: normalized package name match | Alpine Linux edge package indexes: mtr-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Full screen ncurses traceroute tool (documentation) | https://www.bitwizard.nl/mtr/
- apk - mtr-gtk - 0.96-r2: normalized package name match | Alpine Linux edge package indexes: mtr-gtk from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The GTK+ interface for mtr | https://www.bitwizard.nl/mtr/
- dnf - mtr - 0.96-2.fc45: normalized package name match | Fedora Rawhide package metadata: mtr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Network diagnostic tool combining 'traceroute' and 'ping' | https://www.bitwizard.nl/mtr/
- dnf - mtr-gtk - 0.96-2.fc45: normalized package name match | Fedora Rawhide package metadata: mtr-gtk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | GTK interface for MTR | https://www.bitwizard.nl/mtr/
- pacman - mtr - 0.96-1: normalized package name match | Arch Linux sync databases: mtr from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Combines the functionality of traceroute and ping into one tool (CLI version) | https://www.bitwizard.nl/mtr/
- zypper - mtr - 0.96-1.6: normalized package name match | openSUSE Tumbleweed package metadata: mtr from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Ping and Traceroute Network Diagnostic Tool | https://www.bitwizard.nl/mtr/
- zypper - mtr-gtk - 0.96-1.6: normalized package name match | openSUSE Tumbleweed package metadata: mtr-gtk from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Ping and Traceroute Network Diagnostic Tool | https://www.bitwizard.nl/mtr/
- MacPorts - mtr: normalized package name match | MacPorts ports tree: net/mtr/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.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [asn](https://pkg.so/zh-hans/brew/asn/) - Popular package that depends on this formula.
- [nexttrace](https://pkg.so/zh-hans/brew/nexttrace/) - Shares pkgdb curated category or tags: cli, diagnostics, network-diagnostics, networking, traceroute.
- [lft](https://pkg.so/zh-hans/brew/lft/) - Shares pkgdb curated category or tags: cli, diagnostics, network-diagnostics, networking, traceroute.
- [arping](https://pkg.so/zh-hans/brew/arping/) - Shares pkgdb curated category or tags: cli, diagnostics, network-diagnostics, networking.
- [trippy](https://pkg.so/zh-hans/brew/trippy/) - Shares pkgdb curated category or tags: cli, network-diagnostics, networking, ping, traceroute.
- [scamper](https://pkg.so/zh-hans/brew/scamper/) - Shares pkgdb curated category or tags: cli, diagnostics, networking, traceroute.
- [inetutils](https://pkg.so/zh-hans/brew/inetutils/) - Shares pkgdb curated category or tags: cli, networking, ping, traceroute.
- [fping](https://pkg.so/zh-hans/brew/fping/) - Shares pkgdb curated category or tags: cli, network-diagnostics, networking, ping.
- [tcptraceroute](https://pkg.so/zh-hans/brew/tcptraceroute/) - Shares pkgdb curated category or tags: cli, network-diagnostics, networking, traceroute.

## Combined YAML source

View the package source record on GitHub. [combined/mtr.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mtr.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
