Automic VaultAutomic Vault

brew

使用 Homebrew, apk, apt, dnf, Nix, pacman, zypper 安装 lsof

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install lsof

local Homebrew formula metadata

Linux

Alpine Linux apk已验证 · 92%
sudo apk add lsof

Alpine Linux edge package indexes · lsof · 来源: dl-cdn.alpinelinux.org

Debian apt已验证 · 92%
sudo apt install lsof

Debian stable package indexes · lsof · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install lsof

Fedora Rawhide package metadata · lsof · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#lsof

nixpkgs package indexes · pkgs/by-name/ls/lsof/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S lsof

Arch Linux sync databases · lsof · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install lsof

openSUSE Tumbleweed package metadata · lsof · 来源: download.opensuse.org

概览

软件包摘要

Utility to list open files

命令和别名

  • lsof

历史

项目历史与用法

lsof, short for LiSt Open Files, is a long-running Unix diagnostic command for showing which processes have files, directories, devices, sockets, and other file-like objects open. Its official documentation describes common uses such as finding processes blocking unmounts, locating unlinked open files, inspecting network sockets, and filtering by PID, command, or user.

项目历史

The official lsof documentation states that Vic Abell originally developed and maintained lsof beginning in 1994. The project later moved under the lsof-org team on GitHub, which now publishes the current releases and Read the Docs documentation.

lsof's importance comes from the Unix everything-is-a-file model. The official manpage describes support across many Unix dialects, including Linux, Darwin/macOS, FreeBSD, NetBSD, OpenBSD, Solaris, and OpenIndiana, and explains that open files include regular files, directories, character and block devices, executing text references, libraries, streams, internet sockets, NFS files, and Unix-domain sockets.

采用历史

lsof is one of the canonical system-administration packages. The official docs say it is provided by package managers, and the supplied package facts list availability through Homebrew, Alpine, Debian/Ubuntu, Fedora/DNF, Arch, Nix, and openSUSE/Zypper.

The GitHub repository was created for the maintained upstream in 2018 and continues to receive updates. The project documentation lists active support and CI coverage across major Unix-like systems, which helps downstream package maintainers keep it viable despite kernel and platform-specific internals.

使用方式

Administrators and developers use lsof to answer practical questions: which process has a file open, why a filesystem cannot be unmounted, where deleted-but-open files are consuming disk space, which TCP or UDP sockets a process owns, and what a named command or user has open.

The official manpage is unusually rich because lsof has to expose platform-specific kernel data in a portable CLI. It includes selectors for paths, PIDs, users, commands, network addresses, file descriptors, zones, repeat mode, parseable output via `-F`, and device-cache behavior.

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

For package nerds, lsof is foundational plumbing. It is a tiny command with outsized diagnostic value, but it is hard to maintain because it tracks kernel data structures and Unix dialect differences. That combination explains why it is routinely installed by default or close to default in sysadmin toolsets, containers, rescue environments, and debugging checklists.

时间线

  • 1994: Vic Abell begins developing and maintaining lsof.
  • 2018: lsof-org/lsof GitHub repository is created for current upstream maintenance.
  • 2020s: lsof-org maintains Read the Docs documentation and GitHub releases.
  • 2026: Official docs list active support for Linux, FreeBSD, Darwin/macOS, NetBSD, OpenBSD, Solaris/OpenIndiana, and CI testing across common distributions.

Related projects

  • Related diagnostics include fuser, ps, ss, netstat, procfs tools, and platform-specific filesystem or socket inspection commands. lsof remains distinctive because it unifies process, file descriptor, filesystem, and network views in one command.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
lsofcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-26
管理器版本4.99.7
管理器更新时间2026-06-16
本地数据OK
上游当前
检测到的最新版本4.99.7

https://github.com/lsof-org/lsof

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:lsof
版本4.99.7
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/lsof
主页https://github.com/lsof-org/lsof
仓库https://github.com/lsof-org/lsof
上游文档https://lsof.readthedocs.io/en/latest
许可证lsof
源码归档https://github.com/lsof-org/lsof/archive/refs/tags/4.99.7.tar.gz
最后更新2026-06-16T17:44:41Z
Pulseupdated
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namelsof
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyyes
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

liblsof-dev 4.99.4+dfsg-2

utility to list open files (development files)

https://github.com/lsof-org/lsof

sudo apt install liblsof-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: lsof
  • 1 依赖
  • normalized package name match
  • 匹配方式:Lsof
Debian stable package indexes · deb.debian.org · Debian stable package indexes: liblsof-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

liblsof0 4.99.4+dfsg-2

utility to list open files (shared library)

https://github.com/lsof-org/lsof

sudo apt install liblsof0
  • Section: libs
  • Architecture: amd64
  • Source Package: lsof
  • 2 依赖
  • normalized package name match
  • 匹配方式:Lsof
Debian stable package indexes · deb.debian.org · Debian stable package indexes: liblsof0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

lsof 4.99.4+dfsg-2

utility to list open files

https://github.com/lsof-org/lsof

sudo apt install lsof
  • Section: utils
  • Architecture: amd64
  • 4 依赖
  • normalized package name match
  • 匹配方式:Lsof
Debian stable package indexes · deb.debian.org · Debian stable package indexes: lsof from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

lsof

nix profile install nixpkgs#lsof
  • normalized package name match
  • 匹配方式:Lsof
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ls/lsof/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

lsof 4.95.0-1build3

utility to list open files

https://github.com/lsof-org/lsof

sudo apt install lsof
  • Section: utils
  • Architecture: amd64
  • 3 依赖
  • normalized package name match
  • 匹配方式:Lsof
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: lsof from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
apk95%

lsof 4.99.6-r0

LiSt Open Files

https://github.com/lsof-org/lsof

sudo apk add lsof
  • License: custom
  • Architecture: x86_64
  • Source Package: lsof
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Lsof
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: lsof from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

lsof-doc 4.99.6-r0

LiSt Open Files (documentation)

https://github.com/lsof-org/lsof

sudo apk add lsof-doc
  • License: custom
  • Architecture: x86_64
  • Source Package: lsof
  • normalized package name match
  • 匹配方式:Lsof
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: lsof-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf95%

lsof 4.99.6-1.fc45

A utility which lists open files on a Linux/UNIX system

https://github.com/lsof-org/lsof

sudo dnf install lsof
  • License: lsof
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: lsof
  • 4 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Lsof
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: lsof from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
pacman95%

lsof 4.99.6-1

Lists open files for running Unix processes

https://github.com/lsof-org/lsof

sudo pacman -S lsof
  • License: custom
  • Architecture: x86_64
  • 2 依赖
  • normalized package name match
  • 匹配方式:Lsof
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: lsof from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

liblsof0 4.99.4-3.3

Library for listing information about files opened by process

https://github.com/lsof-org/lsof

sudo zypper install liblsof0
  • License: Zlib
  • Category: System/Monitoring
  • Architecture: x86_64
  • Source Package: lsof
  • 3 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Lsof
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: liblsof0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
zypper95%

lsof 4.99.4-3.3

A Program That Lists Information about Files Opened by Processes

https://github.com/lsof-org/lsof

sudo zypper install lsof
  • License: Zlib
  • Category: System/Monitoring
  • Architecture: x86_64
  • Source Package: lsof
  • 3 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Lsof
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: lsof from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
zypper95%

lsof-devel 4.99.4-3.3

Library for listing information about files opened by process

https://github.com/lsof-org/lsof

sudo zypper install lsof-devel
  • License: Zlib
  • Category: System/Monitoring
  • Architecture: x86_64
  • Source Package: lsof
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Lsof
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: lsof-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment