lsof
lsof
lsof
stands for list open files- Typically best run as
sudo
to capture all files
- Typically best run as
- Incredibly helpful in understanding what all is connected and how they're connected.
- Usage:
lsof
-i
is internet connections-P
port number only- e.g.,
22
and notssh
- e.g.,
-p [process id]
shows everything tied to a specific process ID (PID)
Metadata
Sources
lsof(8) - Linux manual page
How to use the lsof command to troubleshoot Linux | Enable Sysadmin