Kill ’em All

So you’re messing around and all of a sudden a program or 2 or even more stop responding. What do you do?  Well for starters you DON’T restart your system, well not initially anyway.

If a program (process) starts to act up and gets out of line, you are perfectly within your rights to go psyco and kill it. To use this command there are a few things you need to know, well really just one thing (other than some options you can use), and that’s the process number! This isn’t too hard to find just enter ps ux | less, the less is there so that you can scroll just in case the output is more than one page long.  This will list all of the processes that you (the user) are currently running. However you can also enter ps aux | less, to list ALL process that are running. Reading the table isn’t difficult so once you find what you are looking for just remember the number.

Now the fun begins. Suppose that the process number happens to be 7331.  Then the first thing to try is kill 7331.  If this doesn’t work then enter kill -9 7331.  The -9 will force the process to be killed without interruption (which might have caused kill 7331 not to work).  A command similar to kill is killall, which works with process names rather than process numbers.  So if 7331 were say firefox you would enter killall firefox. I should note that killall will end ALL instances of the program (firefox in this case) and not just the one that is misbehaving (7331).  More info on killall can be found here.

Here is a little video to help you remember all of this.

Advertisements

One Response to Kill ’em All

  1. Miorel says:

    How will going Psyco help? 😛

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: