<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; killall</title> <atom:link href="http://www.ghacks.net/tag/killall/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Linux 101: kill and killall</title><link>http://www.ghacks.net/2010/11/12/linux-101-kill-and-killall/</link> <comments>http://www.ghacks.net/2010/11/12/linux-101-kill-and-killall/#comments</comments> <pubDate>Thu, 11 Nov 2010 22:05:35 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[kill]]></category> <category><![CDATA[killall]]></category> <category><![CDATA[process control]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36756</guid> <description><![CDATA[If you&#8217;ve come across an application or a process that just won&#8217;t die, and you&#8217;re thinking that you might want to reboot your machine &#8211; STOP! There is no need for rebooting in Linux (unless you&#8217;ve just upgraded your kernel). There are plenty of ways to get rid of an application that refuses to listen [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve come across an application or a process that just won&#8217;t die, and you&#8217;re thinking that you might want to reboot your machine &#8211; STOP! There is no need for rebooting in Linux (unless you&#8217;ve just upgraded your kernel). There are plenty of ways to get rid of an application that refuses to listen to the File  &gt; Exit or File &gt; Quit or that handy X button in the upper right corner. When you&#8217;ve exhausted all of your options, there is always the command line.</p><p>For taking care of stubborn Linux applications, there are two very helpful commands: <em>kill </em>and <em>killall. </em>But how are they used? Are the complicated or are they simple? Let&#8217;s examine these two very handy commands.</p><p><span
id="more-36756"></span><strong>Installation?</strong></p><p>Oh no. These two commands are installed in all Linux distributions by default. To use them all you have to do is open up a terminal window and start blowing away applications. But which should you use?</p><p><strong>Kill</strong></p><p>The man page of the <em>kill</em> command states that <em>kill</em> will &#8220;send a signal to a process.&#8221; That sounds harmless enough. But what is the signal it sends? If reason stands, that signal would be one to terminate the process. Oddly enough TERM (short for terminate) is not the only signal <em>kill </em>can send. There is a fairly lengthy list of possible signals (all of them different) that can be had by issuing the command <em>kill -l</em>. You will find 62 different signals you can send with <em>kill</em>. The default is TERM which will terminate a process.</p><p>So, how do you use <em>kill? </em>Simple. You first must know the process ID of the process you want to kill. Let&#8217;s say good ol&#8217; Firefox isn&#8217;t responding and you need to get rid of it. To do this you first need to find out what the PID of the currently running Firefox is. To do this you would issue a command like:</p><p><code>ps aux|grep firefox</code></p><p>Which would return something like:<br
/> <code>jlwallen 18387  0.0  0.0   1832   556 ?        S    16:53   0:00 /bin/sh /usr/lib/firefox-3.6.12/firefox<br
/> jlwallen 18392  0.0  0.0   1832   572 ?        S    16:53   0:00 /bin/sh /usr/lib/firefox-3.6.12/run-mozilla.sh /usr/lib/firefox-3.6.12/firefox-bin<br
/> jlwallen 18396 26.0  2.2 201420 46492 ?        Dl   16:53   0:01 /usr/lib/firefox-3.6.12/firefox-bin<br
/> jlwallen 18413  0.0  0.0   3324   816 pts/0    S+   16:53   0:00 grep --color=auto firefox</code></p><p>The PID you are looking for will be the one associated with <em>firefox-bin. </em>In the example above, that PID is 18396. So to kill Firefox you would then issue the command <em>kill 18396</em>. That command would instantly kill Firefox.</p><p>There is an easier way!</p><p><strong>killall</strong></p><p>What if you don&#8217;t want to jump through the hoops of finding the PID of the process. If you know the name of the process you can, instead, make use of the <em>killall</em> command. Instead of killing a process by ID, killall kills a process by name. There are signals you can send with <em>killall</em> (either by name or number), but the one that is most often used is -9. So to kill Firefox with <em>killall</em> you would issue the command:</p><p><code>killall -9 firefox-bin</code></p><p>The obvious problem with this is you must know the exact name of the process you want to kill. So if you don&#8217;t know the name you can go back <em>ps aux|grep firefox</em> to get the exact name of the process.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/12/linux-101-kill-and-killall/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Linux Process Management: Command Line</title><link>http://www.ghacks.net/2009/02/25/linux-process-management-command-line/</link> <comments>http://www.ghacks.net/2009/02/25/linux-process-management-command-line/#comments</comments> <pubDate>Wed, 25 Feb 2009 01:25:33 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[kill]]></category> <category><![CDATA[killall]]></category> <category><![CDATA[process control]]></category> <category><![CDATA[ps]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10739</guid> <description><![CDATA[Previously I wrote about using GUI tools for Linux process management (Get To Know Linux: Process Management.) Both the GNOME and the KDE tools are outstanding, user-friendly solutions to an issue that can often become troublesome. But what if you are running a headless server? Or what happens if that runaway process is X Windows [...]]]></description> <content:encoded><![CDATA[<p>Previously I wrote about using GUI tools for Linux process management (<a
title="Get To Know Linux: Process Management" href="http://www.ghacks.net/2009/02/23/get-to-know-linux-process-management/" target="_blank">Get To Know Linux: Process Management</a>.) Both the GNOME and the KDE tools are outstanding, user-friendly solutions to an issue that can often become troublesome. But what if you are running a headless server? Or what happens if that runaway process is X Windows itself? What do you do? You open up a terminal window and issue a command. In this article you are going to learn just that, killing rogue processes by command line.</p><p>Although you might think this a system of process management that should be avoided by the new user, you should consider that there may be times when knowing this process can really save your skin. So, although you may tend to shy away from the command line tools, this would be one of those that is good to know in a pinch.</p><p><span
id="more-10739"></span><strong>The Commands</strong></p><p>The first thing you have to understand is the commands you will be using. There are two commands that are useful: <em>kill </em>and <em>killall</em>. The <em>kill</em> command is used in conjunction with a process ID (PID) and the <em>killall</em> command is used in conjunction with command names. Your first reaction is most likely &#8220;How do I get the PID of an application?&#8221; Well, that will take another command.</p><p><strong>Learn By Example</strong></p><p>Let&#8217;s use Firefox as an example. Say, for some reason, Firefox has frozen and you can not get it to respond. Open up a terminal and issue the command <em>killall firefox </em>if that doesn&#8217;t kill Firefox then Firefox was started with a different command. To find out what that command is you could employ the <em>ps</em> command like so:</p><p>ps aux|grep firefox</p><p>The output would look something like:<code><br
/> [jlwallen ~]$ ps aux|grep firefox<br
/> jlwallen 10199  3.8 28.8 417396 223764 ? RNsl Feb23  77:22 /usr/lib/mozilla/firefox-bin -a firefox<br
/> jlwallen 13434  0.0  0.0   3796   688 pts/0  RN+  20:14   0:00 grep firefox</code></p><p>You see the line that includes <em>firefox-bin</em>? That is most like what you need to kill. So issue the command <em>killall firefox-bin</em> and the frozen Firefox will go away.</p><p>If you look up at the command output again you can see the output includes the PID of each command. The PID associated with <em>firefox-bin</em> would be 10199. You could issue the command <em>kill 10199</em> and Firefox would close as well.</p><p><strong>Frozen X</strong></p><p>What if X Windows freezes and you know the culprit was, say, Evolution? You can&#8217;t get to a terminal window so what do you do? You have to go to a different virtual console. To do this you will hit the key combination Ctrl-Alt-F* (Where * is a number 1-9. This number will differ depending upon which virtual console X is running.) Once you are in a virtual consol you will have to log in as your user and then issue the kill command. You can then go back to the virtual console running X and, hopefully, it will be back under your control.</p><p><strong>Final Thoughts</strong></p><p>It&#8217;s not as user-friendly as either the GNOME or KDE tools, but this method is a very valuable method of process control. Some day you will need to have this method in your tool belt and, when you do, you&#8217;ll be glad you have it.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/25/linux-process-management-command-line/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
