LinuxQuestions.org
Visit Jeremy's Blog.
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, 01: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, 01:49 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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, 01: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, 02: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, 03: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 06:01 PM
Please dont kill me for asking.. Command line? (I AM i n00b) Nox_hand Linux - Newbie 17 09-17-2005 03:59 PM
kill program command line demmylls Linux - General 7 02-09-2004 08:55 PM
one-line kill command using process name julianop Linux - Newbie 6 12-22-2003 11:33 PM
Kill a process by command ITJedi Programming 3 03-07-2003 10:49 AM


All times are GMT -5. The time now is 11:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration