Fuser command in linux

Fuser Command in Linux

Introduction

Files and folders in Linux are accessed by processes of a particular identity. You must know the id of the specific process if you want to perform any action on that process.

It is among the most important tasks of Linux systems administrators. It is involved in a number of activities under supervision, signaling processes, and setting the priorities of processes on the system.

Now we’re gonna teach you to find processes by using the fuser command in Linux.

The syntax of the fuser command

The popular syntax:

$ fuser [options] [file|socket]
$ fuser [options] -SIGNAL [file|socket]
$ fuser -l

Or you can look up usage with the command:

$

Sponsored
fuser

Output:

Fuser command in linux 1

Using the fuser command

1. Checking the process detail accessing

$ fuser -v .

Output:

Fuser command in linux 2

In the above command, it displayed USER, PID, ACCESS and COMMAND.

For example, I want to check the processes accessing of file test:

$ fuser -v -m test

Output:

Fuser command in linux 3

Sponsored

2. Killing signal

For example, to kill all the processes, run the command:

$ fuser -k .

Output:

Fuser command in linux 4

Using -ki option to ask yes/no:

$ fuser -ki .

Output:

Fuser command in linux 5

3. Listing all signals:

$ fuser -l

Output:

Fuser command in linux 6

Conclusion

We just taught you to find processes by using the fuser command in Linux.

Thank you for reading!

Karim buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply