Privacy Policy
© 2025 linux101.dev

fuser Command Cheatsheet

The fuser command identifies the process IDs (PIDs) of processes that are using a specific file, directory, or socket. It's often used to determine why a file cannot be accessed or a filesystem cannot be unmounted.

Common Usage

CommandDescription
fuser [FILE_PATH]Lists the PIDs of processes using the specified file.
fuser -k [FILE_PATH]Kills all processes using the specified file. It sends a `SIGKILL` signal by default.
fuser -u [FILE_PATH]Lists the PIDs and usernames of processes using the specified file.
fuser -n tcp [PORT]Lists the PIDs of processes using a specific TCP port. For example, `fuser -n tcp 8080`.
fuser -m [MOUNT_POINT]Lists all processes using the specified filesystem or mount point. For example, `fuser -m /var`.

Key `fuser` Flags

FlagDescription
-kSends a kill signal to the processes. You can specify a different signal with `-k -SIGNAL`.
-iInteractive mode. Asks for confirmation before killing a process.
-uAppends the username of the process owner to the output.
-vVerbose mode, providing a more detailed, `ps`-like output.