fuser
Quick Reference
Command Name:
fuser
Category:
process management
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
Syntax
fuser [options] file|directory... fuser [options] [-n namespace] name...
Options
Option | Description |
---|---|
-a, --all | Show all files specified, not just those being accessed by processes |
-k, --kill | Kill processes accessing the file (SIGKILL is default signal) |
-i, --interactive | Ask for confirmation before killing |
-l, --list-signals | List available signal names |
-m, --mount | Show all processes using the mounted filesystem containing the specified file |
-n, --namespace NAMESPACE | Use this namespace (file, udp, tcp, etc.) |
-s, --silent | Silent operation, no output shown |
-SIGNAL | Send specified signal instead of SIGKILL when used with -k |
-u, --user | Append the user name of the process owner |
-v, --verbose | Verbose output, shows more details about processes |
-w, --wait | Wait for all killed processes to die (with -k) |
-4, --ipv4 | Search only for IPv4 sockets |
-6, --ipv6 | Search only for IPv6 sockets |
Examples
How to Use These Examples
The examples below show common ways to use the fuser
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Usage:
fuser /var/log/syslog
Show processes using the syslog file.
fuser -v /home/user/document.txt
Verbose output showing detailed information about processes using the specified file.
Finding Processes Using Mounted Filesystems:
fuser -m /mnt/usb
Show all processes using files in the /mnt/usb mount point.
fuser -vm /home
Verbose listing of all processes using the /home filesystem.
Network Socket Operations:
fuser -n tcp 80
Show processes using TCP port 80.
fuser -vn udp 53
Verbose output of processes using UDP port 53.