# 使用 Homebrew, MacPorts, Nix, apk, winget 安装 iproute2mac

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

## 安装

```sh
sudo av install brew:iproute2mac
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install iproute2mac
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install iproute2mac
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#iproute2mac
```

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

- apk (92%):

```sh
sudo apk add bridge
```

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

### Windows

- winget (92%):

```sh
winget install --id Geomitron.Bridge -e
```

  证据: Windows Package Manager source index: Geomitron.Bridge from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:iproute2mac
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/iproute2mac>
- **版本:** 1.7.4
- **来源摘要:** CLI wrapper for basic network utilities on macOS - ip command
- **主页:** <https://github.com/brona/iproute2mac>
- **仓库:** <https://github.com/brona/iproute2mac>
- **许可证:** MIT
- **源码归档:** <https://github.com/brona/iproute2mac/releases/download/v1.7.4/iproute2mac-1.7.4.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- bridge (cli)
- ip (cli)
- ss (cli)
- bridge (别名)
- ip (别名)
- ss (别名)

## 依赖

- python@3.14

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.7.4
- 本地数据: OK
- 上游仓库: https://github.com/brona/iproute2mac
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

iproute2mac is a macOS command-line compatibility wrapper that provides ip, bridge, and ss commands inspired by Linux iproute2 for administrators who move between Linux and macOS.

### 项目历史

The project README describes a deliberately limited wrapper for basic macOS network utilities, not a complete reimplementation of Linux iproute2. Its goal is to make routine macOS network configuration and debugging easier for administrators already fluent in Linux-style ip commands.

The changelog shows an incremental compatibility project: early 1.0.x releases fixed ip address and neighbor handling; v1.1.0 added ip route get source-address output and marked acceptance into Homebrew master; v1.3.0 migrated to Python 3; v1.5.0 added JSON output and bridge; and v1.7.0 added ss plus brief/oneline output options.

### 采用历史

iproute2mac found its audience in the macOS admin and developer niche where muscle memory from Linux is valuable but macOS networking remains built on ifconfig, netstat, route, ndp, arp, and networksetup. The README explicitly sends advanced users back to those native tools for deeper work.

Distribution through Homebrew is part of the project's identity: the README lists Homebrew as the preferred installation path and notes the formula is maintained by the project author. It also documents MacPorts and NixOS packaging.

### 使用方式

The command set covers common inspection and light configuration tasks: ip link, ip addr, ip route, ip neigh, bridge link, and ss, with selected support for JSON, color, brief, and oneline output. Its value is ergonomic consistency, not total kernel feature parity.

Because macOS lacks Linux netlink and tc semantics, iproute2mac translates familiar syntax onto native macOS tools and data sources. The README warns that functionality and output compatibility are limited, which is the right contract for a portability shim.

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

iproute2mac is interesting because it packages muscle memory. It is a small Python wrapper that turns a platform mismatch into a command-line convenience, while keeping the boundary visible enough that serious macOS networking work still goes through native tools.

### 时间线

- v1.0.x: Early releases fix ip addr, ip neigh, help, and versioning behavior.
- v1.1.0: Project is accepted into Homebrew master and no longer requires a tap.
- v1.3.0: Codebase migrates to Python 3.
- v1.5.0: JSON output and bridge command support are added.
- v1.7.0: ss command and brief/oneline output options are added.

### Related projects

- Linux iproute2 is the direct inspiration and compatibility target.
- macOS ifconfig, netstat, ndp, arp, route, and networksetup are the native tools beneath or beside the wrapper.
- MacPorts and NixOS provide alternate package-manager routes alongside Homebrew.

### 来源

- Homebrew formula metadata supplies package-manager presence, formula description, macOS requirement, and adoption signals.
- The GitHub README supplies project goal, limitations, command coverage, installation paths, changelog, and related native macOS tools.


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

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

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

- Nix - iproute2mac: normalized package name match | nixpkgs package indexes: pkgs/by-name/ip/iproute2mac/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - iproute2mac: normalized package name match | MacPorts ports tree: net/iproute2mac/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- apk - bridge - 1.5-r5: installed executable or alias match | Alpine Linux edge package indexes: bridge from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Scripts for configuring network bridge interfaces | https://wiki.alpinelinux.org/wiki/Bridge
- winget - Geomitron.Bridge: installed executable or alias match | Windows Package Manager source index: Geomitron.Bridge from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [socket_vmnet](https://pkg.so/zh-hans/brew/socket-vmnet/) - Shares pkgdb curated category or tags: cli, macos, networking.
- [iproute2](https://pkg.so/zh-hans/brew/iproute2/) - Shares pkgdb curated category or tags: cli, networking, routing.
- [monocle](https://pkg.so/zh-hans/brew/monocle/) - Shares pkgdb curated category or tags: cli, networking, routing.
- [macosvpn](https://pkg.so/zh-hans/brew/macosvpn/) - Shares pkgdb curated category or tags: cli, macos, networking.
- [c-ares](https://pkg.so/zh-hans/brew/c-ares/) - Shares pkgdb curated category or tags: cli, networking.
- [unbound](https://pkg.so/zh-hans/brew/unbound/) - Shares pkgdb curated category or tags: cli, networking.
- [telnet](https://pkg.so/zh-hans/brew/telnet/) - Shares pkgdb curated category or tags: cli, networking.
- [socat](https://pkg.so/zh-hans/brew/socat/) - Shares pkgdb curated category or tags: cli, networking.
- [archgw](https://pkg.so/zh-hans/brew/archgw/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, networking, python, python-3-14, routing.
- [gensio](https://pkg.so/zh-hans/brew/gensio/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, networking, python, python-3-14.
- [netshow](https://pkg.so/zh-hans/brew/netshow/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, network, networking, python, python-3-14.

## Combined YAML source

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