macOS
brew install lsoflocal Homebrew formula metadata
安装
brew install lsoflocal Homebrew formula metadata
sudo apk add lsofAlpine Linux edge package indexes · lsof · 来源: dl-cdn.alpinelinux.org
sudo dnf install lsofFedora Rawhide package metadata · lsof · 来源: dl.fedoraproject.org
nix profile install nixpkgs#lsofnixpkgs package indexes · pkgs/by-name/ls/lsof/package.nix · 来源: api.github.com
sudo pacman -S lsofArch Linux sync databases · lsof · 来源: geo.mirror.pkgbuild.com
sudo zypper install lsofopenSUSE Tumbleweed package metadata · lsof · 来源: download.opensuse.org
概览
Utility to list open files
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
lsof | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/lsof-org/lsof
安装元数据
| 软件包键 | 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 |
| Pulse | updated |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | lsof |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
liblsof-dev 4.99.4+dfsg-2
utility to list open files (development files)
https://github.com/lsof-org/lsof
sudo apt install liblsof-devliblsof0 4.99.4+dfsg-2
utility to list open files (shared library)
https://github.com/lsof-org/lsof
sudo apt install liblsof0lsof 4.99.4+dfsg-2
utility to list open files
https://github.com/lsof-org/lsof
sudo apt install lsoflsof
nix profile install nixpkgs#lsoflsof 4.95.0-1build3
utility to list open files
https://github.com/lsof-org/lsof
sudo apt install lsoflsof 4.99.6-r0
LiSt Open Files
https://github.com/lsof-org/lsof
sudo apk add lsoflsof-doc 4.99.6-r0
LiSt Open Files (documentation)
https://github.com/lsof-org/lsof
sudo apk add lsof-doclsof 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 lsoflsof 4.99.6-1
Lists open files for running Unix processes
https://github.com/lsof-org/lsof
sudo pacman -S lsofliblsof0 4.99.4-3.3
Library for listing information about files opened by process
https://github.com/lsof-org/lsof
sudo zypper install liblsof0lsof 4.99.4-3.3
A Program That Lists Information about Files Opened by Processes
https://github.com/lsof-org/lsof
sudo zypper install lsoflsof-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来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.