{"id":2021,"date":"2021-09-20T09:41:50","date_gmt":"2021-09-20T09:41:50","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2021"},"modified":"2021-09-20T09:41:50","modified_gmt":"2021-09-20T09:41:50","slug":"steps-to-kill-a-process-in-linux-unix","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/","title":{"rendered":"Steps to Kill a Process in Linux\/Unix"},"content":{"rendered":"<p>A computer method refers to a computer program having a unique method identification or additionally known as PID. Basically, on the Linux operating system, a method could also be running within the background, foreground or could also be in a suspended state. it&#8217;d attainable that on Linux, the OS shell may not return the prompt to the end-user unless this method that&#8217;s running is finished. As a result, several processes that take a considerable amount of your time to execute and keep you from utilizing the console till the method is finished running.<\/p>\n<p>For Linux users the most common problem that arises is to kill or background a method so different tasks are conducted on the system. so as to kill a method, a signal has to be sent using the Linux kill command.<\/p>\n<p>Following are the steps that show using \u201ckill\u201d command how to kill a Linux process ?<\/p>\n<p><strong>Step 1:<\/strong> For the running process on your system which you want to kill enter the below Linux command to get the PID.<\/p>\n<pre>ps myProcess<\/pre>\n<p>Once you enter the above command it&#8217;ll come back with one thing the same as the following:<\/p>\n<pre>PID TTY TIME CMD\r\n1234 dz07 0:50 edit myBook\r\n1235 dz07 0:47 -csh<\/pre>\n<p><strong>Step 2:<\/strong> As the first process mentioned in the example above, enter the following Linux kill command to terminate :<\/p>\n<p>To terminate the second active process enter the following command:<\/p>\n<pre>kill -1 1235<\/pre>\n<p><strong>Step 3:<\/strong> It might happen in some case the kill -1 does not work, for these you need to use the -9 argument to clear the process from your system. Use the command as follow:<\/p>\n<pre>kill -9 1234\r\n\r\nkill -9 1235<\/pre>\n<p><strong>Step 4:<\/strong> Instead by using the killall command you can also kill all the instances of a given process . Enter the command as shown below:<\/p>\n<pre>killall &lt;pname&gt;<\/pre>\n<pre>&lt;pname&gt; refer to the process name.<\/pre>\n<p>As it requires root access to the server, this tutorial is applicable only on VPS or a Dedicated Server, .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A computer method refers to a computer program having a unique method identification or additionally known as PID. Basically, on the Linux operating system, a method could also be running within the background, foreground or could also be in a suspended state. it&#8217;d attainable that on Linux, the OS shell may not return the prompt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2021","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Steps to Kill a Process in Linux\/Unix - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Steps to Kill a Process in Linux\/Unix - OWS KB\" \/>\n<meta property=\"og:description\" content=\"A computer method refers to a computer program having a unique method identification or additionally known as PID. Basically, on the Linux operating system, a method could also be running within the background, foreground or could also be in a suspended state. it&#8217;d attainable that on Linux, the OS shell may not return the prompt [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-20T09:41:50+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/\",\"name\":\"Steps to Kill a Process in Linux\/Unix - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-09-20T09:41:50+00:00\",\"dateModified\":\"2021-09-20T09:41:50+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/steps-to-kill-a-process-in-linux-unix\/\",\"name\":\"Steps to Kill a Process in Linux\/Unix\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2021"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2021\/revisions"}],"predecessor-version":[{"id":2022,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2021\/revisions\/2022"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}