{"id":13939,"date":"2022-01-14T09:25:12","date_gmt":"2022-01-14T09:25:12","guid":{"rendered":"https:\/\/linuxways.net\/?p=13939"},"modified":"2022-01-14T09:25:22","modified_gmt":"2022-01-14T09:25:22","slug":"fuser-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/fuser-command-in-linux\/","title":{"rendered":"Fuser Command in Linux"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>Now we&#8217;re gonna teach you to find processes by using the fuser command in Linux.<\/p>\n<h2>The syntax of the fuser command<\/h2>\n<p>The popular syntax:<\/p>\n<pre>$ fuser [options] [file|socket]<\/pre>\n<pre>$ fuser [options] -SIGNAL [file|socket]<\/pre>\n<pre>$ fuser -l<\/pre>\n<p>Or you can look up usage with the command:<\/p>\n<pre>$ fuser<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"610\" class=\"wp-image-13940\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-289.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-289.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-289-300x189.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-289-768x483.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<h2>Using the fuser command<\/h2>\n<p>1. Checking the process detail accessing<\/p>\n<pre>$ fuser -v .<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"328\" class=\"wp-image-13941\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-290.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-290.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-290-300x102.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-290-768x260.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p>In the above command, it displayed <strong>USER<\/strong>, <strong>PID<\/strong>,<strong> ACCESS<\/strong> and<strong> COMMAND<\/strong>.<\/p>\n<p>For example, I want to check the processes accessing of file test:<\/p>\n<pre>$ fuser -v -m test<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"308\" class=\"wp-image-13942\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-291.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-291.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-291-300x95.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-291-768x244.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p>2. Killing signal<\/p>\n<p>For example, to kill all the processes, run the command:<\/p>\n<pre>$ fuser -k .<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"128\" class=\"wp-image-13943\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-292.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-292.png 970w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-292-300x40.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-292-768x101.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>Using -ki option to ask yes\/no:<\/p>\n<pre>$ fuser -ki .<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"65\" class=\"wp-image-13944\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-293.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-293.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-293-300x20.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-293-768x52.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p>3. Listing all signals:<\/p>\n<pre>$ fuser -l<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"88\" class=\"wp-image-13945\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-294.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-294.png 970w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-294-300x27.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-294-768x70.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>We just taught you to find processes by using the fuser command in Linux.<\/p>\n<p>Thank you for reading!<\/p>","protected":false},"excerpt":{"rendered":"<p>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&hellip;<\/p>","protected":false},"author":1,"featured_media":13969,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,5,83,165,2],"tags":[851,35],"class_list":["post-13939","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-mint","category-opensuse","category-red-hat","category-ubuntu","tag-fuser-command","tag-linux"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=13939"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13939\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13969"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=13939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=13939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=13939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}