# 使用 Homebrew, dnf, Nix, apt, pacman, scoop, zypper 安装 netcat

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

## 安装

```sh
sudo av install brew:netcat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install netcat
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install netcat
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#netcat
```

  证据: nixpkgs package indexes: netcat from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- Debian apt (92%):

```sh
sudo apt install netcat-traditional
```

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

- pacman (92%):

```sh
sudo pacman -S openbsd-netcat
```

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

- zypper (92%):

```sh
sudo zypper install netcat-openbsd
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/netcat
```

  证据: Scoop official bucket manifest trees: bucket/netcat.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:netcat
- **软件包管理器:** Homebrew
- **版本:** 0.7.1
- **来源摘要:** Utility for managing network connections
- **主页:** <https://netcat.sourceforge.net/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- nc (别名)
- netcat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Homebrew's netcat formula packages GNU Netcat 0.7.1, a GPL implementation of the classic nc-style tool for reading and writing TCP/UDP connections. Its own homepage frames it as both a scriptable back-end and a network debugging/exploration utility, with outbound and inbound connections, tunneling, and port-scanning features.

### 项目历史

GNU Netcat is separate from the original Hobbit netcat lineage. The GNU project page records active development milestones in 2002, including a beta label starting with version 0.4 on May 15, 2002, and a core rewrite beginning around version 0.3 on May 2, 2002. The downloads page lists 0.7.1 as the current version and gives its release date as January 11, 2004; that long-stable release is what Homebrew distributes.

### 采用历史

The package's adoption is mostly legacy and compatibility-driven rather than fast-moving. On July 1, 2026, the Homebrew formula page showed 12,774 installs over 365 days and 790 installs over 30 days, evidence that people still install this GNU variant even though many systems also ship OpenBSD nc, Nmap ncat, or other netcat-compatible tools.

### 使用方式

Package nerds use it for quick socket plumbing: listen on a port, connect to a host and port, test TCP/UDP reachability, move bytes between shell pipelines and sockets, or build small ad hoc tunnels. The important packaging detail is that behavior and flags vary across netcat implementations, so installing brew:netcat is often a way to get the old GNU semantics intentionally instead of relying on the platform-provided nc.

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

This is a small but historically important compatibility package: not glamorous, not actively evolving, but useful when scripts expect GNU Netcat's option set. Its significance is mostly in being one of the archetypal Unix network Swiss-army-knife tools and a source of recurring packaging confusion because nc/netcat names are shared by several implementations.

### 时间线

- 2002-05-02: GNU netcat 0.3 development and a core rewrite were announced on the project news page.
- 2002-05-15: GNU Netcat entered beta status with version 0.4.
- 2004-01-11: GNU Netcat 0.7.1 was released.
- 2026-07-01: Homebrew listed stable version 0.7.1 and 12,774 installs over 365 days.

### Related projects

- OpenBSD netcat
- Nmap ncat
- socat

### 来源

- <https://formulae.brew.sh/formula/netcat>
- <https://netcat.sourceforge.net/>
- <https://netcat.sourceforge.net/download.php>
- <https://netcat.sourceforge.net/news.php>


## 安全说明

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

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

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

- Debian apt - netcat-traditional - 1.10-50: normalized package name match | Debian stable package indexes: netcat-traditional from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | TCP/IP swiss army knife | http://www.stearns.org/nc/
- Nix - netcat: normalized package name match | nixpkgs package indexes: netcat from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - netcat-traditional - 1.10-48: normalized package name match | Ubuntu 24.04 LTS package indexes: netcat-traditional from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | TCP/IP swiss army knife | http://www.stearns.org/nc/
- dnf - netcat - 1.238-2.fc45: normalized package name match | Fedora Rawhide package metadata: netcat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | OpenBSD netcat to read and write data across connections using TCP or UDP | https://man.openbsd.org/nc.1
- pacman - openbsd-netcat - 1.238_1-1: normalized package name match | Arch Linux sync databases: openbsd-netcat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | TCP/IP swiss army knife. OpenBSD variant. | https://salsa.debian.org/debian/netcat-openbsd
- zypper - netcat-openbsd - 1.229-1.5: normalized package name match | openSUSE Tumbleweed package metadata: netcat-openbsd from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | TCP/IP swiss army knife | https://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
- Scoop - main/netcat: normalized package name match | Scoop official bucket manifest trees: bucket/netcat.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- dnf - nmap-ncat - 7.92-12.fc45: installed executable or alias match | Fedora Rawhide package metadata: nmap-ncat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Nmap's Netcat replacement | http://nmap.org/


## Combined YAML source

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


## 来源

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