fuser
Overview
fuser identifies processes using files, mount points, or ports. Complementary to lsof with concise PID lists and optional signaling.
Syntax
fuser [options] name...Common Options
| Option | Description |
|---|---|
-v |
Verbose (USER, PID, ACCESS, COMMAND) |
-m |
Name specifies a filesystem/mount |
-k |
Kill processes (SIGKILL by default with -k) |
-i |
Interactive confirm before kill |
-n tcp|udp |
Select namespace for ports |
80/tcp |
Port syntax example |
Key Use Cases
- Find who blocks unmount
- See PIDs on a TCP port
- Signal processes holding a file
Safety
-k sends kill signals; always prefer -iv first on shared systems.
Examples with Explanations
Who uses a mount?
sudo fuser -vm /mnt/dataVerbose list before umount.
Port holders
sudo fuser -v 22/tcpProcesses bound to SSH port.
Interactive kill on a file
fuser -ki file.lockAsk before signaling.