Skip to main content

Display process IDs currently using files or sockets.

# To find which processes are accessing a file or directory:
fuser <path/to/file_or_directory>

# To show more fields ('USER', 'PID', 'ACCESS' and 'COMMAND'):
fuser --verbose <path/to/file_or_directory>

# To identify processes using a TCP socket:
fuser --namespace tcp <port>

# To kill all processes accessing a file or directory (sends the 'SIGKILL' signal):
fuser --kill <path/to/file_or_directory>

# To find which processes are accessing the filesystem containing a specific file or directory:
fuser --mount <path/to/file_or_directory>