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

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

## 安装

```sh
sudo av install brew:nethack
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nethack
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nethack
```

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

### Linux

- apk (92%):

```sh
sudo apk add nethack
```

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

- dnf (92%):

```sh
sudo dnf install nethack
```

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

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

- pacman (92%):

```sh
sudo pacman -S nethack
```

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

- zypper (92%):

```sh
sudo zypper install nethack
```

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

- Debian apt (92%):

```sh
sudo apt install nethack-common
```

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

### Windows

- winget (92%):

```sh
winget install --id Nethack.Nethack -e
```

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

## 软件包事实

- **软件包键:** brew:nethack
- **软件包管理器:** Homebrew
- **版本:** 5.0.0
- **来源摘要:** Single-player roguelike video game
- **主页:** <https://www.nethack.org/>
- **仓库:** <https://github.com/NetHack/NetHack>
- **最后更新:** 2026-07-29T08:49:47+01:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- nethack (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

NetHack is one of the canonical open source roguelikes: a single-player dungeon exploration game descended from Rogue and Hack, with the official 5.0 material describing it as a direct descendant of NetHack 3.6 and a distant descendant of Rogue and Hack. The official site describes the game as portable across many computer systems, with graphical and text interfaces over the same game engine, and with an emphasis on learning dungeon details rather than simply killing every monster.

The Homebrew formula tracks the 5.0.0 source release and reported 2,205 installs in the 365-day window in its API generated on 2026-07-01. That is modest package-manager volume, but NetHack's importance is cultural and historical: the official site itself links to long-running USENET discussion, articles, academic references, and AI challenge material.

### 项目历史

The official repository README for NetHack 5.0.0 says the release is an enhancement to the dungeon exploration game NetHack, a distant descendant of Rogue and Hack, and a direct descendant of NetHack 3.6. The official home page announced NetHack 5.0.0 on 2026-05-02, followed by updated platform binaries in May and June 2026.

The official information page preserves the old-school release culture around the project: new versions are announced on the website and USENET, and release dates are not forecast. The same page explains that the 'Net' in NetHack refers to the distributed way developers organize work, not multiplayer gameplay.

### 采用历史

NetHack's adoption is deeper than raw install counters suggest. The official site still points players to rec.games.roguelike.nethack, rec.games.roguelike.announce, print references, web retrospectives, AI-related work, and public community discussion, which is exactly how a terminal game from the 1980s stayed alive across Unix, Windows, macOS, Amiga, MS-DOS, and other ports.

On Homebrew, the 2026-07-01 formula API reported stable version 5.0.0 with 195 installs in 30 days, 1,061 in 90 days, and 2,205 in 365 days. GitHub showed the official mirror with thousands of stars and a 5.0.0 release dated 2026-05-02.

### 使用方式

Package users install it to run the `nethack` executable, usually as a terminal roguelike with personal settings in a `.nethackrc`. Practical use is not automation or library integration; it is playing a famously deep procedural dungeon game, often with custom options, tiles or curses front ends, and community servers or local builds.

The package-nerd use case is preservation-friendly portability: build it on odd platforms, run it over SSH, test old-school terminal behavior, or keep a classic roguelike in a package collection. Its save and bones files are version-sensitive, which the official information page calls out for 5.0.0.

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

NetHack is a package collection staple because it is both software history and a living C codebase. A package index that lacks it looks culturally thin, even if the install count is smaller than modern developer tools.

### 时间线

- 1985-2026: official site copyright range for NetHack-related code.
- 2023-02-16: NetHack 3.6.7 release notes announced a security-fix release.
- 2026-05-02: official home page announced NetHack 5.0.0.
- 2026-06-09: official home page announced updated 5.0.0 binaries for Windows, Amiga, and MS-DOS.

### Related projects

- Rogue
- Hack
- NetHack Challenge
- rec.games.roguelike.nethack

### 来源

- <https://formulae.brew.sh/api/formula/nethack.json>
- <https://github.com/NetHack/NetHack>
- <https://www.nethack.org/>
- <https://www.nethack.org/common/info.html>
- <https://www.nethack.org/v367/release.html>


## 安全说明

没有找到 nethack 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## 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: ~/.nethackrc
## 其他软件包管理器记录

- Debian apt - nethack-common - 3.6.7-1+b2: normalized package name match | Debian stable package indexes: nethack-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | dungeon crawl game - common files | https://www.nethack.org
- Debian apt - nethack-console - 3.6.7-1+b2: normalized package name match | Debian stable package indexes: nethack-console from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | dungeon crawl game - text-based interface | https://www.nethack.org
- Debian apt - nethack-qt - 3.6.7-1+b2: normalized package name match | Debian stable package indexes: nethack-qt from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | dungeon crawl game - Qt interface | https://www.nethack.org
- Debian apt - nethack-x11 - 3.6.7-1+b2: normalized package name match | Debian stable package indexes: nethack-x11 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | dungeon crawl game - X11 interface | https://www.nethack.org
- Nix - nethack: normalized package name match | nixpkgs package indexes: pkgs/by-name/ne/nethack/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - nethack-common - 3.6.7-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: nethack-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | dungeon crawl game - common files | https://www.nethack.org
- Ubuntu apt - nethack-console - 3.6.7-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: nethack-console from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | dungeon crawl game - text-based interface | https://www.nethack.org
- Ubuntu apt - nethack-qt - 3.6.7-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: nethack-qt from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | dungeon crawl game - Qt interface | https://www.nethack.org
- Ubuntu apt - nethack-x11 - 3.6.7-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: nethack-x11 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | dungeon crawl game - X11 interface | https://www.nethack.org
- apk - nethack - 5.0.0-r0: normalized package name match | Alpine Linux edge package indexes: nethack from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A single player dungeon exploration game | https://www.nethack.org/
- apk - nethack-doc - 5.0.0-r0: normalized package name match | Alpine Linux edge package indexes: nethack-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A single player dungeon exploration game (documentation) | https://www.nethack.org/
- dnf - nethack - 5.0.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: nethack from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A rogue-like single player dungeon exploration game | https://nethack.org
- pacman - nethack - 5.0.0-1: normalized package name match | Arch Linux sync databases: nethack from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A single player dungeon exploration game | https://www.nethack.org
- zypper - nethack - 3.6.7-1.5: normalized package name match | openSUSE Tumbleweed package metadata: nethack from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Turn-based role-playing game | https://www.nethack.org
- MacPorts - nethack: normalized package name match | MacPorts ports tree: games/nethack/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - Nethack.Nethack: normalized package name match | Windows Package Manager source index: Nethack.Nethack from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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