AptLynx

Command-line tool

lsof

brew/lsof

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

Utility to list open files

At a glance

Type
Command-line tool
Install on
macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

macOS

brew install lsof

Linux

brew install lsof

Find the processes that have a given file open

lsof path/to/file

Find the process that opened a local internet port

lsof -i :port

Only output the process ID (PID)

lsof -t path/to/file

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents