{"id":1776,"date":"2020-10-14T04:42:40","date_gmt":"2020-10-14T04:42:40","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=1776"},"modified":"2024-08-14T09:20:28","modified_gmt":"2024-08-14T09:20:28","slug":"how-to-kill-process-by-name-in-linux","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/","title":{"rendered":"How to Kill Process by Name in Linux"},"content":{"rendered":"\n<p>Linux provides many tools to manage system processes. System administrators use them to create, clone, and even destroy processes. Often they identify the PID of a process and then kill it using kill command. But sometimes you may need to kill all processes by name in Linux. There are multiple ways to do this in Linux. You can use any of pkill, pgrep, pidof and killall functions. In this article we will look at them in detail.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#Why_Kill_Process_By_Name\" >Why Kill Process By Name<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#How_to_Kill_Process_by_Name_in_Linux\" >How to Kill Process by Name in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#1_Using_pkill\" >1. Using pkill<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#2_Using_pgrep\" >2. Using pgrep<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#3_Using_pidof\" >3. Using pidof<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#4_Using_killall\" >4. Using killall<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Kill_Process_By_Name\"><\/span>Why Kill Process By Name<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sometimes certain processes stop working or become unresponsive. In such cases, it is required to kill the process. These processes may also be running in background even after they have been closed. They occupy unnecessary system resources and slow down your system. Therefore, you need to kill them. It can be tedious to kill a process by finding its PID and then issuing kill command for it. If your system itself is slow, why run two commands to do a single task? It is much better and easier to kill a process by using its name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Kill_Process_by_Name_in_Linux\"><\/span>How to Kill Process by Name in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the different ways to kill process by name in linux<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Using_pkill\"><\/span>1. Using pkill<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><em><a href=\"https:\/\/linux.die.net\/man\/1\/pkill\" target=\"_blank\" rel=\"noreferrer noopener\">pkill<\/a><\/em> command allows you to directly kill process by name. It is similar to killall command but provides more options for pattern matching. For example, here&#8217;s the command to kill all processes by name <em>apache<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo pkill apache<\/pre>\n\n\n\n<p>You may also use -f option to search the actual command used for running the process, instead of searching only the process name. For example, here&#8217;s the command to search and kill process with command \/etc\/apache\/bin\/apache<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo pkill -f \/etc\/apache\/bin\/apache<\/pre>\n\n\n\n<p>The above commands will kill all processes owned by all users. If you only want to only kill processes owned by specific user, use -u &#8216;username&#8217; option.<\/p>\n\n\n\n<p>Like kill command, you can also send specific signals to processes by using -s option followed by signal number.<\/p>\n\n\n\n<p>Bonus Read : <a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-create-tar-gz-file-in-linux\/\">How to create tar.gz file in Linux<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Using_pgrep\"><\/span>2. Using pgrep<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><em>pgrep<\/em> command returns a list of PIDs based on the input search string. You can also use <em>pgrep<\/em> command to search for all the commands by their name and use the <em>kill<\/em> command to kill those processes in Linux.<\/p>\n\n\n\n<p>The following command will list PIDs of all processes with name <em>apache<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ pgrep apache\n6123\n6230<\/pre>\n\n\n\n<p>Here&#8217;s the command to kill all processes by name <em>apache<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ <code>kill -9 `pgrep apache`<\/code><\/pre>\n\n\n\n<p>The pgrep command will output a list of PIDs with name <em>apache<\/em>, which are used as input for <em>kill<\/em> command.<\/p>\n\n\n\n<p>Bonus Read : <a href=\"https:\/\/ubiq.co\/tech-blog\/linux-list-processes-name-user-pid\/\">List all Processes by Name, User, PID<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Using_pidof\"><\/span>3. Using pidof<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Similarly, you can also use <em>pidof<\/em> command to get the list of PIDs for a process name<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ pidof apache\n6123 6230<\/pre>\n\n\n\n<p>Once you have retrieved the PIDs of desired processes, you can terminate it using kill command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ kill -9 6123 6230<\/pre>\n\n\n\n<p>You can pass this list to kill command to kill all processes by name.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ kill -9 <code>`pidof apache<\/code>`<\/pre>\n\n\n\n<p>Bonus Read : <a href=\"https:\/\/ubiq.co\/tech-blog\/search-file-linux\/\">How to Search a File in Linux<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Using_killall\"><\/span>4. Using killall<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can also use killall command to kill all processes by name or other attributes. It works like kill command but works on multiple processes at once.<\/p>\n\n\n\n<p>Here is its syntax.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">killall [options] process_name<\/pre>\n\n\n\n<p>Here is an example to kill all processes containing the string &#8216;apache&#8217; in its name.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ killall -9 apache<\/pre>\n\n\n\n<p>If you do not have the permission to kill processes, you may need to add sudo keyword before your killall command.<\/p>\n\n\n\n<p>Please note, when you use killall command as-is, it will look for the process containing the specific string. If you want to kill only the process whose name exactly matches the given pattern, then you need to use -e option.<\/p>\n\n\n\n<p>Also, by default, killall command will terminate processes without asking for any confirmation. If you want a confirmation prompt before process termination, use -i option.<\/p>\n\n\n\n<p>Like in the case of kill command, you can also specify the specific signal to send, using -s option.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt several important ways to kill processes by name. If a process becomes slow or unresponsive, or your system itself faces these problems, then have no option to terminate the process. In fact, even if it is consuming too much system resources, or there is a software bug that prevents it from closing gracefully after it is done, you need to do the same. You can use any of the pkill, pgrep, pidof and killall commands for this purpose. You just need to be careful about killing multiple processes, while killing them by name. Hopefully, the above article will help you kill all processes by name in Linux.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to kill all processes by name in Linux. Here&#8217;s how to kill process by name in Linux.<\/p>\n","protected":false},"author":1,"featured_media":1781,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[110],"tags":[194],"class_list":["post-1776","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-kill-process"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Kill Process by Name in Linux - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to kill all processes by name in Linux. Here&#039;s how to kill process by name in Linux using pkill, pgrep, pidof and killall commands.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Kill Process by Name in Linux - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to kill all processes by name in Linux. Here&#039;s how to kill process by name in Linux using pkill, pgrep, pidof and killall commands.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-14T04:42:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-14T09:20:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Kill Process by Name in Linux\",\"datePublished\":\"2020-10-14T04:42:40+00:00\",\"dateModified\":\"2024-08-14T09:20:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/\"},\"wordCount\":755,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1\",\"keywords\":[\"kill process\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/\",\"name\":\"How to Kill Process by Name in Linux - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1\",\"datePublished\":\"2020-10-14T04:42:40+00:00\",\"dateModified\":\"2024-08-14T09:20:28+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to kill all processes by name in Linux. Here's how to kill process by name in Linux using pkill, pgrep, pidof and killall commands.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1\",\"width\":800,\"height\":400,\"caption\":\"how to kill process by name in linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-kill-process-by-name-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Kill Process by Name in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Kill Process by Name in Linux - Ubiq BI","description":"Sometimes you may need to kill all processes by name in Linux. Here's how to kill process by name in Linux using pkill, pgrep, pidof and killall commands.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Kill Process by Name in Linux - Ubiq BI","og_description":"Sometimes you may need to kill all processes by name in Linux. Here's how to kill process by name in Linux using pkill, pgrep, pidof and killall commands.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-10-14T04:42:40+00:00","article_modified_time":"2024-08-14T09:20:28+00:00","og_image":[{"width":800,"height":400,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png","type":"image\/png"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Kill Process by Name in Linux","datePublished":"2020-10-14T04:42:40+00:00","dateModified":"2024-08-14T09:20:28+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/"},"wordCount":755,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1","keywords":["kill process"],"articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/","name":"How to Kill Process by Name in Linux - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1","datePublished":"2020-10-14T04:42:40+00:00","dateModified":"2024-08-14T09:20:28+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to kill all processes by name in Linux. Here's how to kill process by name in Linux using pkill, pgrep, pidof and killall commands.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1","width":800,"height":400,"caption":"how to kill process by name in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-kill-process-by-name-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Kill Process by Name in Linux"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/how-to-kill-a-process-by-name.png?fit=800%2C400&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-sE","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=1776"}],"version-history":[{"count":18,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1776\/revisions"}],"predecessor-version":[{"id":4130,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1776\/revisions\/4130"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/1781"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=1776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=1776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=1776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}