Linux: Show Opened Files, lsof

By Xah Lee. Date: . Last updated: .

You can use the command lsof to list all files opened by processes.

In unix/linux, “everything” is a file. Devices (such as all USB device) are files, network sockets are files, directory is a file.

Here's some of the commonly used options.

linux lsof 2017 04 18
lsof showing first few files opened by firefox

FD → means “file descriptor”. Common FD code are:

see man lsof for complete list and description.

TYPE → is the file type. Common types are: