0

Confessions of a Linux noob: killall command

Ubuntu

I am usually one for taking the hard approach to solving a problem, and then realizing there is a far easier way to approach it afterwards... sometimes *long* afterwards.  I almost hate posting this one considering I have now been using Ubuntu about 6 months, but perhaps I am not the only one out there that didn't know this.  

Typically when I have to kill a process in Linux, I type in:

>sudo ps -A

This returns a list of all running processes with their process IDs next to them.  I then find the process I am looking for and type:

>sudo kill [whatever process ID]

This works just fine, but there is a far quicker way.  All you need to do is:

>sudo killall [process name]

This takes care of the problem in a single step.   Go ahead...  laugh it up Linux guys.

tags:
Ubuntu
Matt Woodward said:
 
J00 R SV(H 4 N00b!!!!111

Just kidding man--I've been using some flavor of Linux on and off for, well, longer than I care to admit at this point and I'm still uncovering little gems like this every day.

Oh yeah--may not matter to you but wait until you experience how screwed up the permission stuff on Vista is. Makes the unix stuff seem damn simple and logical (as it always has been).
 
posted 1083 days ago
Add Comment Reply to: this comment OR this thread
 
Seth Bienek said:
 
"Makes the unix stuff seem damn simple and logical (as it always has been). "

..Yes, because "chmod 666" makes sooooo much sense. ;)

Seriously, though, despite the learning curve I must say that Linux has been good to me so far. Of course the fact that Vista, based on what I've read so far, scares the crap out of me doesn't hurt.
 
posted 1083 days ago
Add Comment Reply to: this comment OR this thread
 
Matt Woodward said:
 
Well, once you get the hang of the unix stuff at least it A) works and B) is consistent. Nobody said there wasn't a learning curve. ;-)

Example on the Vista crap. Your "user" is a member of the administrator group but doesn't have full admin rights. It gets better ... I tried opening my httpd.conf file on Vista and save it back to the conf directory--said I didn't have rights. Saved it to my Documents directory, and then it DID let me drag the file from my Documents directory into the conf directory; no permissions problems when I did that.

Can you say WTF? :-)
 
posted 1083 days ago
Add Comment Reply to: this comment OR this thread
 
Seth Bienek said:
 
We are in transition at the house. The Boy loves linux - he's 5 and scoots around, pulls up lego.com in FireFox, plays his games and does all the other important stuff he needs to get done.

The Wifey and I do Ok, but she occasionally will hit a snag.. The only thing I think we will really be missing out on is Office 2007, which I can't (or won't) afford anyway. I've been on the beta, and I have to say, it's the first major, useful innovation MS has had since "Bob". :)

Anyway, thanks Dave for posting your findings as you run across them, they are little nuggets of gold for us fellow 'n00bs'.

Viva Bob,

Seth
 
posted 1083 days ago
Add Comment Reply to: this comment OR this thread
 
Bob said:
 
Hello! You can also do:
kill `pidof whatever`

(Assuming there's only one instance of "whatever" running).
The point being that pidof is a much easier way of getting something's pid (process ID).

And if this kind of thing is new to you, perhaps the ``s will be too - use the ` characters to execute the command between them and output the return value (just like in perl).

So if "pidof whatever" prints "100" to your screen, then:
kill `pidof whatever`
is essentially the same as "kill 100".
 
posted 831 days ago
Add Comment Reply to: this comment OR this thread
 
WOW gold said:
 
 
posted 214 days ago
Add Comment Reply to: this comment OR this thread
 

Search