Frequent Question: What Is Lsof Used for in Linux?
Contents

lsof is a command meaning “list open files”, which is used in many Unix-like systems to report a list of all open files and the processes that opened them.

How does lsof work in Linux?

How does lsof work? When used without options, lsof lists all files that are open (in use) on your system. If you run the lsof as yourself, you will get a long listing, but the output will include a lot of permission denied messages – many representing open files in the /proc file system that you’re not allowed to see.

What does lsof return?

The lsof (list open files) command returns the user processes that are actively using a file system. It is sometimes helpful in determining why a file system remains in use and cannot be unmounted.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest