# 使用 Homebrew, apk, apt, MacPorts, Nix, pacman, zypper, scoop, winget 安装 lf

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

## 安装

```sh
sudo av install brew:lf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lf
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lf
```

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

### Linux

- apk (92%):

```sh
sudo apk add lf
```

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

- Debian apt (92%):

```sh
sudo apt install lf
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#lf
```

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

- pacman (92%):

```sh
sudo pacman -S lf
```

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

- zypper (92%):

```sh
sudo zypper install lf
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/lf
```

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

- winget (92%):

```sh
winget install --id LlamaFarm.CLI -e
```

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

## 软件包事实

- **软件包键:** brew:lf
- **软件包管理器:** Homebrew
- **版本:** 42
- **来源摘要:** Terminal file manager
- **主页:** <https://godoc.org/github.com/gokcehan/lf>
- **仓库:** <https://github.com/gokcehan/lf>
- **最后更新:** 2026-07-31T09:33:27Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lf (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

`lf`, short for 'list files', is a terminal file manager written in Go and heavily inspired by ranger. It packages the familiar keyboard-driven file-manager workflow as a single static binary with shell-extensible commands.

### 项目历史

The `gokcehan/lf` repository was created on August 13, 2016. Its README describes a cross-platform terminal file manager with ranger inspiration, fast startup, low memory footprint, asynchronous I/O, a server/client architecture, remote commands, shell-command extensibility, and configurable keybindings.

The official documentation can be read inside the program with `lf -doc`, via the `help` command, as a man page, or online in `doc.md`, which reinforces the package's culture as a terminal-first application rather than a GUI file browser.

### 采用历史

lf became a staple option in the small but active terminal-file-manager ecosystem. The package metadata in this batch lists packages across Alpine, Homebrew, Debian, MacPorts, Nix, Arch, Scoop, Ubuntu, winget, and openSUSE, which matches its cross-platform design.

### 使用方式

Users launch `lf` in a directory, navigate with keyboard bindings, preview files, run shell commands, and use configuration files such as `lfrc`, `colors`, and `icons` to tailor behavior. Its design encourages composing with external previewers, openers, editors, and shell scripts.

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

Package nerds care about lf because it is a modern Go-era reinterpretation of ranger: fast single-binary distribution, portable packaging, and deliberate reliance on external Unix tools for parts of the workflow. It is also a good example of a TUI program whose package value is mostly ergonomics and glue, not a daemon or library.

### 时间线

- 2016: The `gokcehan/lf` repository was created on August 13, 2016.
- 2016: The project was shared publicly as 'lf: A terminal file manager' in command-line communities.
- 2018: Release discussions around r5 show lf already had a user-feedback loop around terminal-file-manager behavior.
- 2026: The upstream repository remained active, with Homebrew packaging and documented cross-platform installation paths.

### Related projects

- lf is most directly related to ranger, its stated inspiration. It sits beside other terminal file managers such as nnn, vifm, yazi, mc, and broot, and it depends culturally on shell tools, preview commands, terminal emulators, and editor integrations.

### 来源

- <https://api.github.com/repos/gokcehan/lf>
- <https://formulae.brew.sh/formula/lf>
- <https://github.com/gokcehan/lf>
- <https://github.com/gokcehan/lf/blob/master/doc.md>
- <https://github.com/gokcehan/lf/releases>


## 安全说明

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: /etc/lf/lfrc, ~/.config/lf/lfrc, /etc/lf/colors, ~/.config/lf/colors, /etc/lf/icons, ~/.config/lf/icons
- Windows: C:\ProgramData\lf\lfrc, C:\Users\<user>\AppData\Roaming\lf\lfrc, C:\ProgramData\lf\colors, C:\Users\<user>\AppData\Roaming\lf\colors, C:\ProgramData\lf\icons, C:\Users\<user>\AppData\Roaming\lf\icons
## 其他软件包管理器记录

- Debian apt - lf - 34+ds-2+b1: normalized package name match | Debian stable package indexes: lf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | terminal file manager written in Go | https://github.com/gokcehan/lf
- Nix - lf: normalized package name match | nixpkgs package indexes: pkgs/by-name/lf/lf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lf - 31+ds-1: normalized package name match | Ubuntu 24.04 LTS package indexes: lf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | terminal file manager written in Go | https://github.com/gokcehan/lf
- apk - lf - 42-r0: normalized package name match | Alpine Linux edge package indexes: lf from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Terminal filemanager written in Go with vim-style keybindings | https://github.com/gokcehan/lf
- apk - lf-bash-completion - 42-r0: normalized package name match | Alpine Linux edge package indexes: lf-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for lf | https://github.com/gokcehan/lf
- apk - lf-doc - 42-r0: normalized package name match | Alpine Linux edge package indexes: lf-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Terminal filemanager written in Go with vim-style keybindings (documentation) | https://github.com/gokcehan/lf
- apk - lf-fish-completion - 42-r0: normalized package name match | Alpine Linux edge package indexes: lf-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for lf | https://github.com/gokcehan/lf
- apk - lf-zsh-completion - 42-r0: normalized package name match | Alpine Linux edge package indexes: lf-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for lf | https://github.com/gokcehan/lf
- pacman - lf - 42-1: normalized package name match | Arch Linux sync databases: lf from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A terminal file manager inspired by ranger | https://github.com/gokcehan/lf
- zypper - lf - 34-1.8: normalized package name match | openSUSE Tumbleweed package metadata: lf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Terminal file manager (with sixel support) | https://github.com/gokcehan/lf
- zypper - lf-bash-completion - 34-1.8: normalized package name match | openSUSE Tumbleweed package metadata: lf-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Completion for lf | https://github.com/gokcehan/lf
- zypper - lf-fish-completion - 34-1.8: normalized package name match | openSUSE Tumbleweed package metadata: lf-fish-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fish Completion for lf | https://github.com/gokcehan/lf
- zypper - lf-zsh-completion - 34-1.8: normalized package name match | openSUSE Tumbleweed package metadata: lf-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh Completion for lf | https://github.com/gokcehan/lf
- MacPorts - lf: normalized package name match | MacPorts ports tree: sysutils/lf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/lf: normalized package name match | Scoop official bucket manifest trees: bucket/lf.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - LlamaFarm.CLI: normalized package name match | Windows Package Manager source index: LlamaFarm.CLI from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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