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

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

## 安装

```sh
sudo av install brew:nano
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nano
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nano
```

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

### Linux

- apk (92%):

```sh
sudo apk add nano
```

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

- Debian apt (92%):

```sh
sudo apt install nano
```

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

- dnf (92%):

```sh
sudo dnf install nano
```

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

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

- pacman (92%):

```sh
sudo pacman -S nano
```

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

- zypper (92%):

```sh
sudo zypper install nano
```

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

### Windows

- Chocolatey (92%):

```sh
choco install nano
```

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

- Scoop (92%):

```sh
scoop install main/nano
```

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

- winget (92%):

```sh
winget install --id ChawyeHsu.Nano -e
```

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

## 软件包事实

- **软件包键:** brew:nano
- **软件包管理器:** Homebrew
- **版本:** 9.2
- **来源摘要:** Free (GNU) replacement for the Pico text editor
- **主页:** <https://www.nano-editor.org/>
- **最后更新:** 2026-07-31T07:24:09Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- nano (别名)
- rnano (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

GNU nano is the small, friendly terminal text editor that began as a free replacement for Pico and became a default-ish editor across Unix-like systems.

### 项目历史

nano began in late 1999 when Chris Allegretta created TIP to provide a free software replacement for Pico, the editor bundled with the University of Washington's Pine mail client. The old nano FAQ says Debian's free-software standards kept Pine/Pico binaries out, leaving users who liked Pico's interface without a fully free package.

The name changed from TIP to nano on 2000-01-10 to avoid conflict with the existing Unix `tip` utility, and nano joined the GNU Project in February 2001. The project kept Pico's approachable modeless interface while adding capabilities that accumulated over time: regular-expression search, syntax highlighting, `.nanorc`, multiple buffers, UTF-8, undo/redo, line numbers, soft wrapping, file locking, and more.

### 采用历史

nano's adoption story is practical rather than flashy: it became the editor many distributions could ship when they wanted a Pico-like, GPL-compatible terminal editor for beginners and recovery shells. Its interface exposed common commands at the bottom of the screen, which made it friendlier than modal editors for quick edits to config files.

Homebrew's formula page consulted on 2026-07-01 listed nano 9.1 and 39,145 installs over the prior 365 days, far above the other packages in this batch. That Mac/Linuxbrew usage reflects its role as a familiar terminal editor even on systems that already ship another editor.

### 使用方式

The manual describes the normal invocation as `nano [FILE]`, with optional line/column positioning, search-on-open, stdin editing via `nano -`, and configuration through nanorc files. Users edit directly because nano is modeless; control and meta key combinations handle save, exit, search, replace, cut, paste, help, and other commands.

Package nerds install nano for quick config edits, container images, remote shells, rescue environments, and scripts or docs that need an editor nearly anyone can operate. The restricted `rnano` binary is useful when an environment wants to limit file access and shell escapes.

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

nano is significant because it solves the packaging and UX problem Pico could not: a small, libre, approachable terminal editor with few dependencies. It is the editor people install when 'just open the file and save it' matters more than an editor culture war.

### 时间线

- Late 1999: Chris Allegretta creates TIP as a free Pico replacement.
- 2000-01-10: TIP is renamed nano.
- 2001-02: nano becomes part of the GNU Project.
- 2007: nano switches to GPL-3.0-or-later licensing in the 2.0.7 era.
- 2026-06-23: nano homepage lists latest version 9.1.
- 2026-07-01: Homebrew Formulae page listed 39,145 installs over the prior 365 days.

### Related projects

- Pico
- Pine
- GNU Project
- ncurses

### 来源

- <https://formulae.brew.sh/formula/nano>
- <https://www.nano-editor.org/>
- <https://www.nano-editor.org/dist/latest/nano.html>
- <https://www.nano-editor.org/dist/v2.2/faq.html>
- <https://www.nano-editor.org/history.php>


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal


## 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: /etc/nanorc, ~/.nanorc, $XDG_CONFIG_HOME/nano/nanorc, ~/.config/nano/nanorc
## 其他软件包管理器记录

- Debian apt - nano - 8.4-1+deb13u1: normalized package name match | Debian stable package indexes: nano from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | small, friendly text editor inspired by Pico | https://www.nano-editor.org/
- Debian apt - nano-tiny - 8.4-1+deb13u1: normalized package name match | Debian stable package indexes: nano-tiny from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | small, friendly text editor inspired by Pico - tiny build | https://www.nano-editor.org/
- Nix - nano: normalized package name match | nixpkgs package indexes: pkgs/by-name/na/nano/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - nano - 7.2-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: nano from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | small, friendly text editor inspired by Pico | https://www.nano-editor.org/
- Ubuntu apt - nano-tiny - 7.2-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: nano-tiny from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | small, friendly text editor inspired by Pico - tiny build | https://www.nano-editor.org/
- apk - nano - 9.2-r0: normalized package name match | Alpine Linux edge package indexes: nano from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Enhanced clone of the Pico text editor | https://www.nano-editor.org/
- apk - nano-doc - 9.2-r0: normalized package name match | Alpine Linux edge package indexes: nano-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Enhanced clone of the Pico text editor (documentation) | https://www.nano-editor.org/
- apk - nano-syntax - 9.2-r0: normalized package name match | Alpine Linux edge package indexes: nano-syntax from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Syntax highlighting definitions for nano | https://www.nano-editor.org/
- dnf - default-editor - 9.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: default-editor from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Metapackage for DNF group | https://www.nano-editor.org
- dnf - nano - 9.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: nano from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A small text editor | https://www.nano-editor.org
- dnf - nano-default-editor - 9.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: nano-default-editor from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Sets GNU nano as the default editor | https://www.nano-editor.org
- pacman - nano - 9.1-1: normalized package name match | Arch Linux sync databases: nano from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | Pico editor clone with enhancements | https://www.nano-editor.org
- pacman - orbiton-nano - 2.74.4-1: normalized package name match | Arch Linux sync databases: orbiton-nano from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Configuration-free text editor and IDE (Nano/Pico Mode) | https://roboticoverlords.org/orbiton/
- zypper - nano - 9.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: nano from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Pico editor clone with enhancements | https://nano-editor.org/
- zypper - nano-lang - 9.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: nano-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Translations for package nano | https://nano-editor.org/
- MacPorts - nano: normalized package name match | MacPorts ports tree: editors/nano/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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