# 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. Also installable with debian: sudo apt install liblsof-dev.

## 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 lsof
```

  Evidence: Debian stable package indexes: lsof 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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

- zypper (92%):

```sh
sudo zypper install lsof
```

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

## Package facts

- **Package key:** brew:lsof
- **Package manager:** Homebrew
- **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>
- **Last updated:** 2026-06-16T17:44:41Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- lsof (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 4.99.7
## 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

## 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.7-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.7-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-2.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A utility which lists open files on a Linux/UNIX system | https://github.com/lsof-org/lsof
- pacman - lsof - 4.99.7-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.7-1.3: normalized package name match | openSUSE Tumbleweed package metadata: liblsof0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Library for listing information about files opened by process | https://github.com/lsof-org/lsof
- zypper - lsof - 4.99.7-1.3: normalized package name match | openSUSE Tumbleweed package metadata: lsof from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Program That Lists Information about Files Opened by Processes | https://github.com/lsof-org/lsof
- zypper - lsof-devel - 4.99.7-1.3: normalized package name match | openSUSE Tumbleweed package metadata: lsof-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Library for listing information about files opened by process | https://github.com/lsof-org/lsof


## Combined YAML source

View the package source record on GitHub. [combined/lsof.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lsof.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
