Categories: TutorialsUbuntu

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:

Using the fuser command

1. Checking the process detail accessing

$ fuser -v .

Output:

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:

Sponsored

2. Killing signal

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

$ fuser -k .

Output:

Using -ki option to ask yes/no:

$ fuser -ki .

Output:

3. Listing all signals:

$ fuser -l

Output:

Conclusion

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

Thank you for reading!

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.

Ubuntu Server Admin

Recent Posts

How to Install Google Cloud BigQuery Python client library on Linux

In this article, we will see how to Install Google Cloud BigQuery Python client library…

2 days ago

Wallpaper Contest for Xfce 4.20 open for voting

Nov 15,2024 Wallpaper Contest for Xfce 4.20 open for voting The submission phase for the…

2 days ago

Canonical announces the first MicroCloud LTS release

MicroCloud 2.1.0 LTS is now available, expanding the number of Canonical infrastructure solutions with a…

2 days ago

Join Canonical in Paris at Dell Technologies Forum

Canonical is thrilled to be joining forces with Dell Technologies at the upcoming Dell Technologies…

3 days ago

Bringing automation to open source 5G software at Ubuntu Summit 2024

In today’s massive private mobile network (PMN) market, one of the most common approaches to…

4 days ago

Ubuntu Weekly Newsletter Issue 865

Welcome to the Ubuntu Weekly Newsletter, Issue 865 for the week of November 3 –…

6 days ago