Where is fuser on linux




















In this example, we will run the fuser command to see which processes are using the current directory. So we see above that a lot of processes are using the current directory as its the home directory. The numeric value s in the output above output represent the PID of the processes using the directory. Complete list of alphabets that can be part of fuser output include :. We repeat the same example as above but this time with -v option :.

Lets consider example of an executable here and see how fuser identifies the processes using an executable. I opted for running fuser on firefox executable which is running on my system :. So the first entry in the output above gives the path to firefox executable running in the system. An extra information regrading the user name of the process owner can also be appended to each PID using the -u option. We can specify multiple files as input to fuser but by default it provides information on the first file it encounters in the input.

Skip to content. Table of Contents. Fuser Help Option. Running Fuser. Fuser -v. Access Types In Fuser. Using Fuser For Files.

Using Fuser For Sockets. Killing Processes With Fuser. List Of Signals. This indicates the type of access. The type of access can be any one of the following:. So we see above that running fuser on the current directory gives the information on all the processes that are using this directory. Its different from the access specifier we saw in above examples. It conveys that the file is an executable. Till now we learned that fuser provides information on the processes using files, directories, sockets etc.

But the power of this utility is not restricted to providing information only. You can also kill processes using this utility. Now, lets try to kill the process using this binary file using fuser. Lets see on the other terminal where the server was running. We already explained you how you can kill a process using 4 different methods.

Now you know one more method to kill a process. See the example below. Hacktoberfest Contribute to Open Source. By Oltjano Terpollari Published on December 3, What process is using your tcp or udp socket?

The -v option is used to put the fuser utility in verbose mode and the -n option is used to select the tcp protocol as a name space. The -6 option can be replaced with the -4 option in order to search for IPv4 sockets running on a specific port. Find The Process Accessing A File System The -m option can be used with the fuser command to find processes accessing files on the filesystem of a file.

Conclusion Of course this article is not enough to cover all options and practical examples of the fuser tool, but every example served in this article will help you in your way to being a Linux ninja. About the authors. Still looking for an answer?

Ask a question Search for more help. Comments Follow-Up Questions. Before you can do that To complete this action, sign in to your Community account or create a new one. Sign In Sign Up.



0コメント

  • 1000 / 1000