{"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"],"_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}]}}