LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2004, 02:43 PM   #1
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Rep: Reputation: 30
How can I see what process are running and how to I kill them? (command line).


How can I see what process are running and how to I kill them? (command line).
 
Old 07-07-2004, 02:49 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi again

ps -<options> To see processes, see man ps for a lot of options.
ps -ef and ps -aux are used a lot.

kill <pid> to kill a process. Pid being the process id. Again the manpage thingie.
 
Old 07-07-2004, 02:49 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
'ps' with various options - a,u,x are useful.

'kill $PID'

or

'killall $NAME'
 
Old 07-07-2004, 03:29 PM   #4
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Rep: Reputation: 31
To kill all the processes of a particular type:

ps -ef|grep <unique text that identifies the processes>|grep -v grep|awk '{print $2}'|xargs kill

So, if you wanted to kill all the mozilla processes on a box you would use
ps -ef|grep mozilla|grep -v grep|awk '{print $2}'|xargs kill

Of course, you can add more greps to this to make it less general. Like,
ps -ef|grep someUsersName|grep mozilla|blah,blah,blah.
 
Old 07-07-2004, 04:01 PM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
top

man top

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to kill an idle user via the command line? goemon Linux - General 7 12-01-2005 07:01 PM
Please dont kill me for asking.. Command line? (I AM i n00b) Nox_hand Linux - Newbie 17 09-17-2005 04:59 PM
kill program command line demmylls Linux - General 7 02-09-2004 09:55 PM
one-line kill command using process name julianop Linux - Newbie 6 12-23-2003 12:33 AM
Kill a process by command ITJedi Programming 3 03-07-2003 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration