Easy user process termination in Solaris and Linux

July 2, 2009

Does anyone know how to determine a user process through a single command in Solaris and Linux ? (Iam not speaking about ps command)

Here is the command

# pgrep -l -u <username>

eg: # pgrep -l -u test

This will display the PIDs and Process names

Eureka..

After this you can kill the process with its id

# kill <PID value>