๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

๐Ÿ’ก Performance & Debugging September 24, 2026 9

Linux Command: fuser

Identify processes using files or sockets

Terminal โ€” Performance & Debugging
Command
$ fuser -vm /mnt/usb/
Output
USER PID ACCESS COMMAND user 1234 ..c.. bash user 5678 ...e. vim

fuser identifies processes using files, directories, or sockets. It shows which processes have a resource open, and can optionally kill them. It is simpler than lsof for specific use cases. fuser is most commonly used to find processes preventing a filesystem from being unmounted, or to identify which process is listening on a specific port. fuser can send signals to the identified processes, making it a one-command solution for "find and kill" scenarios.

Syntax

fuser [OPTION]... NAME...

Key Options

  • -v โ€” Verbose output
  • -m โ€” Show processes using mounted filesystem
  • -k โ€” Kill processes using the resource
  • -n tcp โ€” Show process using TCP port
  • -i โ€” Interactive (ask before killing)

Examples

Find processes on mount

fuser -vm /mnt/usb/

Output: USER PID ACCESS COMMAND user 1234 ..c.. bash user 5678 ...e. vim

Kill processes on mount

sudo fuser -km /mnt/usb/

Check port usage

fuser -vn tcp 80

Output: 80/tcp: 1234

Pro Tips

  • Cannot unmount? fuser -km /mount/point kills blocking processes. Then umount succeeds.
  • fuser is simpler for "who uses this file/port?" lsof is more detailed for comprehensive diagnostics.
  • fuser -k sends SIGKILL by default. Use -ki for interactive mode to confirm each kill.

Learn more: Full fuser reference โ†’

Share this tip