Kill is Your Friend
Ah, slowly I am earning my beans in Ubuntu land. Tonight I had my first legitimate need to use kill and even found out what a PID number was and EVEN read my LOG FILES!! Wow. If you’re just learning Apache admin stuff and just can’t reload or restart your web server, head on over to /var/log/apache2 and check out your error.log file. You prolly shouldn’t randomly kill .pids but if you’re getting a repeated httpd error like mine: “httpd (pid 5347?) not started” it could be that the server was manually shut down (oops, old Windows debugging tactic) and the process just needs to be murdered.
kill 5347
Worked like a charm. Another hint for you fellow newbs…maybe reading an Apache admin book would actually SAVE you time, eh? All I needed to do to enable my dern rewrite was to change AllowOverride None to AllowOverride all in my sites-enabled config. Hmmm….I bet a quick doc on configuring sites in Apache2 would have saved me all that. But then I wouldn’t have ever found out how to kill stuff on linux…so then again, maybe it was all worth it.

Awesome drawing by pure evil bunny on Flickr.
Danny said,
February 8, 2008 @ 3:07 am
have you found
kill -9 PID
yet?
you might also want to look at
man kill
and
man killall
at the prompt
Administrator said,
February 8, 2008 @ 11:47 am
kill -9 PID….sounds ominous…will definitely look into it, or should I just key it in and see what happens, heheh?
Steve said,
February 18, 2008 @ 7:26 pm
It can be useful to pair the kill command with the pgrep command (which determines the PID of a process).
For example, I find that the email reader evolution often crashes, leaving behind 2 or 3 processes that prevent a new version of evolution from being started. In this case I use the command,
pgrep evolution | xargs kill
This finds the pid of any processes with “evolution” in the name, then pipes this to “kill” using the xargs command, thus killing all those processes.
Nick said,
February 19, 2008 @ 4:28 pm
I never knew you could kill by name like that. Sure is a hassle to open up top and look around for PIDs. I bet you could simply script that command to something similar to kill so you could type
killname (or something) evolution
instead of
pgrep evolution | xargs kill
Jake said,
February 20, 2008 @ 6:57 am
I’m really lame. To kill Firefox, I use pkill firefox. If I can’t guess it that way, I use htop to find the process (or just hit Ctrl+Shift+Esc in KDE) and then use killall firefox-bin, or whatever it is.
dC said,
February 20, 2008 @ 7:13 am
You Ubuntu users make me fucking sick.
Mahalie said,
February 20, 2008 @ 9:57 am
If by sick you mean swooning to the point of nausea with complete joy and enthusiasm then thanks!