Find PID for a process

I want to kill a process run by a user of another group.

How do I do that..?

Login as root and do a

ps -ef

You could also grep for the specific process that you are looking out for and also directly fetch the PID directly. The second column is usually the PID.
So:

PROCESS_PID=`ps -ef | grep processname | awk '{print $2}'`
kill -9 $PROCESS_PID

Hmm. Third time this week.
Please avoid issuing "kill -9" it is really the last resort and bypasses normal process cleanup.
The above script is too dangerous to run on any system as "root" because it can make accidental or multiple matches and potentially crash your system.
Also there are different syntaxes for "ps" depending on the Operating System.

Please post sample "ps" output of the process concerned and more detail of what the process does and why you need to kill it.

Sorry I forgot to mention that this would be a dangerous script! :slight_smile: Thanks for chipping in methyl