LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I see what process are running and how to I kill them? (command line). (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-see-what-process-are-running-and-how-to-i-kill-them-command-line-202252/)

brynjarh 07-07-2004 01:43 PM

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).

druuna 07-07-2004 01:49 PM

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.

slakmagik 07-07-2004 01:49 PM

'ps' with various options - a,u,x are useful.

'kill $PID'

or

'killall $NAME'

looseCannon 07-07-2004 02:29 PM

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.

kevinalm 07-07-2004 03:01 PM

top

man top

;)


All times are GMT -5. The time now is 06:42 PM.