# 使用 Homebrew, apk, apt, MacPorts, Nix, pacman, zypper, chocolatey, dnf, scoop, winget 安装 wget

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

## 安装

```sh
sudo av install brew:wget
```

## 代理安全回答

wget fetches remote content and can mirror sites or download installer scripts.

- **凭据访问:** Reads netrc credentials, cookies, headers, and output file paths.
- **远程变更:** Usually fetch-only, but can call authenticated endpoints and write local files.
- **发布/制品风险:** Can download scripts or artifacts that later execute or deploy.
- **推荐控制:** Gate authenticated downloads, recursive mirrors, and shell installer use.
- **代理使用指南:** Allow public single-file downloads; require approval for credentials, recursion, and executable outputs.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install wget
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install wget
```

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

### Linux

- apk (92%):

```sh
sudo apk add wget
```

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

- Debian apt (92%):

```sh
sudo apt install wget
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#wget
```

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

- pacman (92%):

```sh
sudo pacman -S wget
```

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

- zypper (92%):

```sh
sudo zypper install wget
```

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

- dnf (92%):

```sh
sudo dnf install wget1-wget
```

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

### Windows

- Chocolatey (92%):

```sh
choco install Wget
```

  证据: Chocolatey community package catalog: Wget from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','westwindwebsurge'

- Scoop (92%):

```sh
scoop install main/wget
```

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

- winget (92%):

```sh
winget install --id JernejSimoncic.Wget -e
```

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

## 软件包事实

- **软件包键:** brew:wget
- **软件包管理器:** Homebrew
- **版本:** 1.25.0
- **来源摘要:** Internet file retriever
- **主页:** <https://www.gnu.org/software/wget/>
- **最后更新:** 2026-06-26T01:12:58Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- wget (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

GNU Wget is the GNU Project's non-interactive command-line retriever for HTTP, HTTPS, FTP, and FTPS. It is one of the canonical Unix-style tools for scripted downloads, recursive mirroring, resumable transfers, and unattended network retrieval.

### 项目历史

Wget descends from Geturl, a program by Hrvoje Niksic whose development began in late 1995. The name changed to Wget after the author learned of an earlier Amiga program called GetURL. Public Geturl releases appeared in 1996, and Wget 1.4.0 in November 1996 was the first release under the Wget name and the GNU GPL.

The tool solved a real mid-1990s problem: Unix users needed a reliable downloader that could handle both HTTP and FTP, run without a browser, survive slow or unstable dial-up and university connections, and build with ordinary Unix development tools. That combination made it spread quickly among Unix users and later most Linux distributions.

Wget's stewardship moved from the original author to broader GNU maintenance. The GNU project page lists Tim Ruehsen, Darshit Shah, and Giuseppe Scrivano as current maintainers and Hrvoje Niksic as original author. The source is hosted on GNU Savannah, and the manual's copyright range begins in 1996, reflecting the long-running GNU package history.

### 采用历史

Wget became a default tool in the mental toolbox of system administrators, release engineers, distribution maintainers, researchers, and shell users because it is non-interactive and scriptable. Its adoption was reinforced by features that map directly to automation: retrying failed downloads, continuing partial transfers when servers support it, following links for recursive retrieval, converting links for local browsing, using timestamps for mirroring, supporting proxies, and reading URLs from files or standard input.

The package also became important outside ordinary downloads. Since Wget 1.14 it has supported WARC output, making it useful in web archiving workflows. GNU Wget2 is now developed separately for newer web protocols and parallelism, but classic Wget remains widely used because of its stable behavior and enormous installed base.

### 使用方式

Basic use is `wget URL`, but its package-nerd importance comes from flags and composability: `-r` for recursive retrieval, `-c` for continuing partial downloads, `-O -` for piping content to standard output, `-i` for reading URL lists, and `.wgetrc` for persistent defaults. It is equally at home in cron jobs, build scripts, Dockerfiles, release automation, and one-off shell sessions.

Wget's behavior is deliberately non-interactive, so it can keep working after a user logs out or when no graphical environment exists. That makes it a historical counterpart to browsers and graphical download managers: less interactive, but much better suited to repeatable automation.

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

Wget is one of the archetypal packages that demonstrates why small Unix command-line tools matter. It turned web and FTP retrieval into a dependable script primitive, which is why so many other package builds, test fixtures, mirrors, and operational runbooks have depended on it for decades.

### 时间线

- Late 1995: Hrvoje Niksic begins Geturl.
- January 1996: Geturl 1.0 is the first public release.
- November 1996: Wget 1.4.0 becomes the first release under the Wget name and GNU GPL.
- 2012: Wget 1.14 adds WARC output support, extending its role in web archiving.
- 2020s: GNU Wget continues as the stable classic implementation while GNU Wget2 is developed as a successor for newer web features.

### Related projects

- GNU Wget2 is the related successor project for newer web technologies, but Wget remains the classic implementation. curl overlaps with Wget for command-line retrieval, while Wget's traditional strengths are recursive downloading, mirroring, unattended operation, and `.wgetrc`-driven configuration.

### 来源

- <https://audio-video.gnu.org/video/ghm2017/2017-08--ruhsen-shah--wget--ghm.pdf>
- <https://en.wikipedia.org/wiki/Wget>
- <https://git.savannah.gnu.org/cgit/wget.git>
- <https://www.gnu.org/software/wget/>
- <https://www.gnu.org/software/wget/manual/wget.html>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.wgetrc

## Credential files

- Unix: ~/.netrc, ~/.wgetrc
## 其他软件包管理器记录

- Debian apt - wget - 1.25.0-2: normalized package name match | Debian stable package indexes: wget from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | retrieves files from the web | https://www.gnu.org/software/wget/
- Nix - wget: normalized package name match | nixpkgs package indexes: pkgs/by-name/wg/wget/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - wget - 1.21.4-1ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: wget from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | retrieves files from the web | https://www.gnu.org/software/wget/
- apk - wget - 1.25.0-r3: normalized package name match | Alpine Linux edge package indexes: wget from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Network utility to retrieve files from the Web | https://www.gnu.org/software/wget/wget.html
- apk - wget-doc - 1.25.0-r3: normalized package name match | Alpine Linux edge package indexes: wget-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Network utility to retrieve files from the Web (documentation) | https://www.gnu.org/software/wget/wget.html
- dnf - wget1-wget - 1.25.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: wget1-wget from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | wget1 shim to provide wget | http://www.gnu.org/software/wget/
- dnf - wget2-wget - 2.2.1-3.fc45: normalized package name match | Fedora Rawhide package metadata: wget2-wget from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | wget2 shim to provide wget | https://gitlab.com/gnuwget/wget2
- pacman - wget - 1.25.0-6: normalized package name match | Arch Linux sync databases: wget from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Network utility to retrieve files from the web | https://www.gnu.org/software/wget/wget.html
- zypper - wget - 1.25.0-5.2: normalized package name match | openSUSE Tumbleweed package metadata: wget from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Tool for Mirroring FTP and HTTP Servers | https://www.gnu.org/software/wget/
- zypper - wget-lang - 1.25.0-5.2: normalized package name match | openSUSE Tumbleweed package metadata: wget-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Translations for package wget | https://www.gnu.org/software/wget/
- MacPorts - wget: normalized package name match | MacPorts ports tree: net/wget/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - Wget: normalized package name match | Chocolatey community package catalog: Wget from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','westwindwebsurge'
- Scoop - main/wget: normalized package name match | Scoop official bucket manifest trees: bucket/wget.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - JernejSimoncic.Wget: normalized package name match | Windows Package Manager source index: JernejSimoncic.Wget from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
