lsof command

lsof command is an advanced Unix command that is typically not installed with a Unix/Linux distro but can be easily obtained from standard package repositories in most of modern OS distributions.

lsof stands for list open files, but since everything in Unix is a file, you get a lot more than just a list of files open by a given process.

What lsof Is Great For

  • Show all the network connections open on your system (with process names to see what is responsible for each connection)
  • Show list of files open on the operating system or single process level
  • Confirm what is using a specific file or directory
  • Confirm what is using a particular network port

See also




Keep Learning

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!

Recent Tweets