# Install lsof with Homebrew, apk, apt, dnf, Nix, pacman, zypper

Utility to list open files. Version 4.99.7 via Homebrew; verified 2026-06-16.

## Install

```sh
sudo av install brew:lsof
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install lsof
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add lsof
```

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

- Debian apt (92%):

```sh
sudo apt install liblsof-dev
```

  Evidence: Debian stable package indexes: liblsof-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install lsof
```

  Evidence: Fedora Rawhide package metadata: lsof from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#lsof
```

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

- pacman (92%):

```sh
sudo pacman -S lsof
```

  Evidence: Arch Linux sync databases: lsof from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Ubuntu apt (92%):

```sh
sudo apt install lsof
```

  Evidence: Ubuntu 24.04 LTS package indexes: lsof from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz

- zypper (92%):

```sh
sudo zypper install liblsof0
```

  Evidence: openSUSE Tumbleweed package metadata: liblsof0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:lsof
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/lsof>
- **Version:** 4.99.7
- **Source summary:** Utility to list open files
- **Homepage:** <https://github.com/lsof-org/lsof>
- **Repository:** <https://github.com/lsof-org/lsof>
- **Upstream docs:** <https://lsof.readthedocs.io/en/latest>
- **License:** lsof
- **Source archive:** <https://github.com/lsof-org/lsof/archive/refs/tags/4.99.7.tar.gz>
- **Last updated:** 2026-06-16T17:44:41Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- lsof (cli)
- lsof (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.99.7
- Package-manager updated: 2026-06-16
- Local data: ok
- Upstream repository: https://github.com/lsof-org/lsof
- Upstream latest detected: 4.99.7 (current)
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <https://api.github.com/repos/lsof-org/lsof>
- <https://github.com/lsof-org/lsof>
- <https://lsof.readthedocs.io/en/latest/>
- <https://lsof.readthedocs.io/en/latest/manpage/>
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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:** stable

## Other Package-Manager Records

- Debian apt - liblsof-dev - 4.99.4+dfsg-2: normalized package name match | Debian stable package indexes: liblsof-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | utility to list open files (development files) | https://github.com/lsof-org/lsof
- Debian apt - liblsof0 - 4.99.4+dfsg-2: normalized package name match | Debian stable package indexes: liblsof0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | utility to list open files (shared library) | https://github.com/lsof-org/lsof
- Debian apt - lsof - 4.99.4+dfsg-2: normalized package name match | Debian stable package indexes: lsof from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | utility to list open files | https://github.com/lsof-org/lsof
- Nix - lsof: normalized package name match | nixpkgs package indexes: pkgs/by-name/ls/lsof/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lsof - 4.95.0-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: lsof from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | utility to list open files | https://github.com/lsof-org/lsof
- apk - lsof - 4.99.6-r0: normalized package name match | Alpine Linux edge package indexes: lsof from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LiSt Open Files | https://github.com/lsof-org/lsof
- apk - lsof-doc - 4.99.6-r0: normalized package name match | Alpine Linux edge package indexes: lsof-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LiSt Open Files (documentation) | https://github.com/lsof-org/lsof
- dnf - lsof - 4.99.6-1.fc45: normalized package name match | Fedora Rawhide package metadata: lsof from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A utility which lists open files on a Linux/UNIX system | https://github.com/lsof-org/lsof
- pacman - lsof - 4.99.6-1: normalized package name match | Arch Linux sync databases: lsof from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Lists open files for running Unix processes | https://github.com/lsof-org/lsof
- zypper - liblsof0 - 4.99.4-3.3: normalized package name match | openSUSE Tumbleweed package metadata: liblsof0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Library for listing information about files opened by process | https://github.com/lsof-org/lsof
- zypper - lsof - 4.99.4-3.3: normalized package name match | openSUSE Tumbleweed package metadata: lsof from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A Program That Lists Information about Files Opened by Processes | https://github.com/lsof-org/lsof
- zypper - lsof-devel - 4.99.4-3.3: normalized package name match | openSUSE Tumbleweed package metadata: lsof-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Library for listing information about files opened by process | https://github.com/lsof-org/lsof


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [monit](https://www.automicvault.com/pkg/brew/monit/) - Shares av.db curated category or tags: cli, monitoring, system, unix.
- [ansiweather](https://www.automicvault.com/pkg/brew/ansiweather/) - Shares av.db curated category or tags: cli, monitoring, system.
- [asitop](https://www.automicvault.com/pkg/brew/asitop/) - Shares av.db curated category or tags: cli, monitoring, system.
- [bottom](https://www.automicvault.com/pkg/brew/bottom/) - Shares av.db curated category or tags: cli, monitoring, system.
- [bpytop](https://www.automicvault.com/pkg/brew/bpytop/) - Shares av.db curated category or tags: cli, monitoring, system.
- [btop](https://www.automicvault.com/pkg/brew/btop/) - Shares av.db curated category or tags: cli, monitoring, system.
- [collectd](https://www.automicvault.com/pkg/brew/collectd/) - Shares av.db curated category or tags: cli, monitoring, system.
- [ctop](https://www.automicvault.com/pkg/brew/ctop/) - Shares av.db curated category or tags: cli, monitoring, system.
- [gops](https://www.automicvault.com/pkg/brew/gops/) - Local package facts share a topical domain. Shared terms: cli, diagnostics, list, monitoring, processes.

## Combined YAML source

View the package source record on GitHub. [combined/lsof.yml](https://github.com/automic-vault/db/blob/main/combined/lsof.yml)


## Sources

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