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

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

## 安装

```sh
sudo av install brew:cpio
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cpio
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cpio
```

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

### Linux

- apk (92%):

```sh
sudo apk add cpio
```

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

- Debian apt (92%):

```sh
sudo apt install cpio
```

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

- dnf (92%):

```sh
sudo dnf install cpio
```

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

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

- pacman (92%):

```sh
sudo pacman -S cpio
```

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

- zypper (92%):

```sh
sudo zypper install cpio
```

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

### Windows

- winget (92%):

```sh
winget install --id GnuWin32.Cpio -e
```

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

## 软件包事实

- **软件包键:** brew:cpio
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cpio>
- **版本:** 2.15
- **来源摘要:** Copies files into or out of a cpio or tar archive
- **主页:** <https://www.gnu.org/software/cpio/>
- **上游文档:** <https://www.gnu.org/software/cpio/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.bz2>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cpio (cli)
- cpio (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

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

GNU cpio is the GNU implementation of the classic copy-in/copy-out archiver. It copies files between directories and archives, including cpio formats and tar formats, and remains a small but important Unix packaging and recovery tool.

### 项目历史

GNU cpio's manual is published by the Free Software Foundation and documents the program as a tool for creating and extracting archives or copying directory trees. The manual credits Robert Carleton and Sergey Poznyakoff, and the current GNU source package includes documentation maintained through the 2.15 release.

The GNU package history visible in NEWS shows long-running maintenance around archive-format compatibility, large-file support, security fixes, reproducible archive options, and portability fixes. Version 2.0 added SVR4 cpio formats and traditional/POSIX tar archive support; later releases added sparse handling, GPLv3 licensing, reproducible archive support, and security fixes.

### 采用历史

The supplied package facts list GNU cpio across common Unix-like package managers, including Debian, Ubuntu, Fedora/dnf, Alpine/apk, Arch/pacman, openSUSE/zypper, Nix, MacPorts, Homebrew, and a GnuWin32 package. That breadth matches cpio's role as a standard archive utility rather than an application-level tool.

### 使用方式

GNU cpio has three primary modes: copy-out to create archives from file lists, copy-in to extract archives, and copy-pass to copy directory trees. The manual emphasizes pipelines with find or ls, archive media such as disk files, tapes, and pipes, and compatibility with multiple cpio and tar formats.

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

Package maintainers care about cpio because it is both a user-facing archive command and an old archive format that still appears in build systems, initramfs tooling, backups, and historical Unix data. GNU cpio's NEWS also matters to distributors because it records CVE fixes, reproducibility options, and large-file behavior changes.

### 时间线

- 1996: GNU FTP archive lists cpio 2.4.2.
- 2007: Version 2.9 switched GNU cpio to GPLv3.
- 2015: Version 2.12 added --reproducible archive support.
- 2019: Version 2.13 fixed CVE-2015-1197, CVE-2016-2037, and CVE-2019-14866.
- 2024: Version 2.15 fixed copy-in and --no-absolute-filenames behavior.

### Related projects

- GNU tar is related through archive-format compatibility.
- GNU find is commonly paired with cpio to provide file lists.

### 来源

- <https://www.gnu.org/software/cpio/manual/>
- <https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz>
- <https://ftp.gnu.org/gnu/cpio/>


## 安全说明

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:** cpio
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** stable

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

- Debian apt - cpio - 2.15+dfsg-2: normalized package name match | Debian stable package indexes: cpio from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU cpio -- a program to manage archives of files | https://www.gnu.org/software/cpio/
- Nix - cpio: normalized package name match | nixpkgs package indexes: pkgs/by-name/cp/cpio/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cpio - 2.15+dfsg-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: cpio from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GNU cpio -- a program to manage archives of files | https://www.gnu.org/software/cpio/
- apk - cpio - 2.15-r0: normalized package name match | Alpine Linux edge package indexes: cpio from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | tool to copy files into or out of a cpio or tar archive | https://www.gnu.org/software/cpio
- apk - cpio-doc - 2.15-r0: normalized package name match | Alpine Linux edge package indexes: cpio-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | tool to copy files into or out of a cpio or tar archive (documentation) | https://www.gnu.org/software/cpio
- dnf - cpio - 2.15-10.fc45: normalized package name match | Fedora Rawhide package metadata: cpio from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A GNU archiving program | https://www.gnu.org/software/cpio/
- pacman - cpio - 2.15-3: normalized package name match | Arch Linux sync databases: cpio from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool to copy files into or out of a cpio or tar archive | https://www.gnu.org/software/cpio
- zypper - cpio - 2.15-7.4: normalized package name match | openSUSE Tumbleweed package metadata: cpio from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Backup and Archiving Utility | https://www.gnu.org/software/cpio/cpio.html
- zypper - cpio-lang - 2.15-7.4: normalized package name match | openSUSE Tumbleweed package metadata: cpio-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Translations for package cpio | https://www.gnu.org/software/cpio/cpio.html
- zypper - cpio-mt - 2.15-7.4: normalized package name match | openSUSE Tumbleweed package metadata: cpio-mt from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Tape drive control utility | https://www.gnu.org/software/cpio/cpio.html
- MacPorts - cpio: normalized package name match | MacPorts ports tree: archivers/cpio/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - GnuWin32.Cpio: normalized package name match | Windows Package Manager source index: GnuWin32.Cpio from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [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.
- [Archive and compression packages](https://pkg.so/zh-hans/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [virt-manager](https://pkg.so/zh-hans/brew/virt-manager/) - Popular package that depends on this formula.
- [gnu-tar](https://pkg.so/zh-hans/brew/gnu-tar/) - Shares pkgdb curated category or tags: archive, backup, cli, system, tar.
- [p7zip](https://pkg.so/zh-hans/brew/p7zip/) - Shares pkgdb curated category or tags: archive, archiving, cli, system.
- [dar](https://pkg.so/zh-hans/brew/dar/) - Shares pkgdb curated category or tags: archiving, backup, cli, system.
- [sevenzip](https://pkg.so/zh-hans/brew/sevenzip/) - Shares pkgdb curated category or tags: archiving, cli, system.
- [gzip](https://pkg.so/zh-hans/brew/gzip/) - Shares pkgdb curated category or tags: archive, cli, gnu, system.
- [borgbackup](https://pkg.so/zh-hans/brew/borgbackup/) - Shares pkgdb curated category or tags: archive, backup, cli, system.
- [star](https://pkg.so/zh-hans/brew/star/) - Shares pkgdb curated category or tags: backup, cli, system, tar.
- [pax](https://pkg.so/zh-hans/brew/pax/) - Shares pkgdb curated category or tags: archive, cli, system, tar.
- [zip-a-folder](https://pkg.so/zh-hans/npm/zip-a-folder/) - Local package facts share a topical domain. Shared terms: archive, archiving, cli, into, or.

## Combined YAML source

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