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

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

## 安装

```sh
sudo av install brew:less
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install less
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install less
```

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

### Linux

- apk (92%):

```sh
sudo apk add less
```

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

- Debian apt (92%):

```sh
sudo apt install less
```

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

- dnf (92%):

```sh
sudo dnf install less
```

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

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

- pacman (92%):

```sh
sudo pacman -S less
```

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

- zypper (92%):

```sh
sudo zypper install less
```

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

### Windows

- Chocolatey (92%):

```sh
choco install Less
```

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

- Scoop (92%):

```sh
scoop install main/less
```

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

- winget (92%):

```sh
winget install --id jftuga.less -e
```

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

## 软件包事实

- **软件包键:** brew:less
- **软件包管理器:** Homebrew
- **版本:** 704
- **来源摘要:** Pager program similar to more
- **主页:** <https://www.greenwoodsoftware.com/less/index.html>
- **仓库:** <https://github.com/gwsw/less>
- **最后更新:** 2026-06-06T20:47:51Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- less (别名)
- lesskey (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

less is a classic terminal pager: a free, open source program for viewing text one screen at a time, similar to more but with richer navigation and search behavior.

### 项目历史

The official FAQ says less was written by Mark Nudelman and is maintained by him. The source tree's copyright file dates the code line to 1984, and the README identifies the distribution as part of the GNU project while also documenting a separate Less License option.

The program has stayed under active maintenance for decades. Greenwood Software's release page records many numbered releases from the 2010s and 2020s, while the NEWS file tracks ongoing pager features such as OSC 8 hyperlink handling, command mapping, prompt expansion, mouse support, regex behavior, and platform fixes.

### 采用历史

The official home page describes less as present on most Linux, Unix, and Mac OS systems and on many other operating systems. The FAQ also notes distribution through standard Unix-like system software and GNU archives.

Its adoption is helped by being a drop-in pager for commands and environment variables such as PAGER. Developers use it through man, git, shells, build logs, and package-manager output without always invoking it directly.

### 使用方式

less opens files or standard input for interactive viewing, with forward and backward movement, searching, marks, filtering, follow mode, and configurable key bindings through lesskey-style configuration.

Package builds usually install the less and lesskey executables plus manual pages. The README recommends downloading numbered release packages from Greenwood Software for ordinary use and cloning the Git repository only for source development.

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

less is package-nerd bedrock: a tiny command that sits in the path of almost every Unix developer workflow. Its value is partly invisible because many tools delegate paging to it, making the package a system utility dependency rather than an application people consciously launch.

### 时间线

- 1984: The less source copyright line begins with Mark Nudelman's 1984 copyright.
- 2011: Greenwood Software recorded less-444 as a general-use release on June 9, 2011.
- 2021: less-581.2 was released for general use on April 28, 2021.
- 2026: less-702 was released for general use on May 22, 2026.

### Related projects

- more is the older pager less is explicitly compared with.
- GNU distributes less, and many Unix-like systems ship it as part of their standard toolset.

### 来源

- <https://github.com/gwsw/less>
- <https://www.greenwoodsoftware.com/less/>
- <https://www.greenwoodsoftware.com/less/faq.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: $XDG_CONFIG_HOME/lesskey, ~/.config/lesskey, ~/.lesskey, /usr/local/etc/syslesskey
- Windows: ~/_lesskey, lesskey.ini, c:\syslesskey
## 其他软件包管理器记录

- Debian apt - less - 668-1: normalized package name match | Debian stable package indexes: less from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | pager program similar to more | http://www.greenwoodsoftware.com/less/
- Nix - less: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/less/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - less - 590-2ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: less from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | pager program similar to more | http://www.greenwoodsoftware.com/less/
- apk - less - 704-r0: normalized package name match | Alpine Linux edge package indexes: less from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | File pager | https://www.greenwoodsoftware.com/less/
- apk - less-doc - 704-r0: normalized package name match | Alpine Linux edge package indexes: less-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | File pager (documentation) | https://www.greenwoodsoftware.com/less/
- dnf - less - 704-3.fc45: normalized package name match | Fedora Rawhide package metadata: less from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A text file browser similar to more, but better | https://www.greenwoodsoftware.com/less/
- dnf - less-color - 704-3.fc45: normalized package name match | Fedora Rawhide package metadata: less-color from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Colorizers for less | https://www.greenwoodsoftware.com/less/
- pacman - less - 1:704-1: normalized package name match | Arch Linux sync databases: less from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | A terminal based program for viewing text files | https://www.greenwoodsoftware.com/less/
- zypper - less - 704-1.3: normalized package name match | openSUSE Tumbleweed package metadata: less from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Text File Browser and Pager Similar to more | https://www.greenwoodsoftware.com/less/
- MacPorts - less: normalized package name match | MacPorts ports tree: textproc/less/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - Less: normalized package name match | Chocolatey community package catalog: Less from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'
- Scoop - main/less: normalized package name match | Scoop official bucket manifest trees: bucket/less.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - jftuga.less: normalized package name match | Windows Package Manager source index: jftuga.less from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [less](https://pkg.so/zh-hans/pkg/npm/less/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

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