Session and utilities
The fuser command
Says which processes are using a file, a folder or a port. Very useful before unmounting a USB stick.
Syntax
fuser archivo | fuser -n tcp puertoMost useful options
-n tcpQueries a TCP port-kKills the processes using it-vVerbose outputCopy-ready examples
$ printf 'x\n' > f.txt && fuser f.txtWho uses the file?You can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- With -k it can close programs without warning: use it carefully.
FAQ
Why can I not unmount the USB?
Because fuser will tell you which process is using it.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course