LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I kill all processes form a certain user ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-kill-all-processes-form-a-certain-user-339059/)

Menestrel 07-01-2005 09:16 AM

How can I kill all processes from a certain user ?
 
How can I kill all processes from a certain user ? also, I'd like to know how can I kill only a process from a certain user, and leave alone the same process that's running from another user.

Gkarfield 07-01-2005 09:34 AM

ps -ax | grep <username>

i supose. that is for BSD, it will work hopefully for llinux.
it gives the procceses nums. so right after u can kill'em

Fritz_Monroe 07-01-2005 09:39 AM

Here's the section in the Slackbook

My understanding of kill is that if you do a kill using the PID, it will kill that one process. If you do a kill with the name of the process, it will kill all instances of that process. Of course you have to be in as su for the second one. I think you can kill your own processes but nobody else's as a regular user.

F_M

Menestrel 07-04-2005 12:27 AM

I tought there was a easier way. For example, there are three users logged in my machine. And as root I want to "unlog" a certain user. Can this be accomplished by only one command ? must I kill each process of that user, because it seems time-consuming...

Gkarfield 07-04-2005 01:10 AM

guh,

that was cough(:p)

in freebsd always, u do ps -axj |grep <username>

was my fault to write only -ax.


then from the lots off processes

<user> 498 491 498 473 1 I+ v0 0:00.01 xinit
<user> 503 502 502 473 1 I v0 0:00.02 /bin/sh /usr/local/bin/startkde

if u kill this then u blow his window desktop
after this, his is in console
is there any processes stil active? something like login? kill it

have a nice day

Menestrel 07-05-2005 06:26 AM

true true :D

Gkarfield 07-05-2005 09:53 AM

hi

I checked my computer......... and did not hapen that, I am the only user......... but if u find a process named 'X:0' onwned by root.............. :P. kill it and...

the last about 'login' iks only if he is in console. I have no linux at the moment, so I can not test it


cyaaaaaaaaaaa


All times are GMT -5. The time now is 09:19 AM.