Your Ultimate Information Platform

LINUX 101: Learn how to use the kill and killall instructions



Jack Wallen reveals you the essential distinction between two instructions that finish with the identical outcomes … closing unresponsive purposes.

linux penguin

Picture: Jack Wallen

It is a uncommon event {that a} Linux software will run astray, but it surely does occur. This most frequently occurs with user-facing apps, reminiscent of browsers, workplace suites and the like. When that occurs, what do you do? You flip to kill or killall, two instructions that provide you with absolute management over whether or not an software can proceed operating or not. 

SEE: 5 Linux server distributions you ought to be utilizing (TechRepublic Premium)

In the event you discover an app has grow to be unresponsive, both kill or killall won’t ever fail to indicate that app who’s boss: You. However which command do you have to use? 

To be sincere, I virtually at all times use killall. Why? As a result of with the killall command I haven’t got to fret about first discovering the PID of the operating course of. And when you want to eliminate a course of shortly, nothing beats killall

The one caveat to utilizing killall is that it’s important to know the true title of the method. As an example, you could not simply concern the command killall libreoffice, as a result of the command used to launch the software is perhaps soffice.bin. 

So, there’s the trick with utilizing killall. You could know the title of the particular command and never the applying. For that, I’d launch prime to see which apps are operating, because it’ll record them by command title. 

I may cease LibreOffice with the killall soffice.bin command. 

With the kill command, you kill by means of the method ID, so that you’d first want to make use of a software like prime to seek out the PID. With the PID in hand, you might kill LibreOffice with a command like kill 279329

The vital factor to recollect is the killall requires the precise command title of the app you need to drive shut, and kill requires the method ID of the applying. Between these two instructions, you’ve gotten all the facility at your fingertips to finish wayward purposes.

Additionally see


Leave A Reply

Your email address will not be published.