Monday, April 15, 2013

Basic process handling in Linux - List, Kill processes of specific user

It is very common to encounter basic commands that are very useful, but you forget how to do them or their syntax (maybe you forget the parameters or all the options they have). Specially if you are not constantly using them.

top command displays in console a list of tasks being handled by the kernel.

If you write top -u <username> you can filter those tasks/processes by username.

If you want to kill all processes for a given user, you can use pkill -u <username>.

As always, you can use the help pages while on the command prompt, such as man <command>, or info <command> or even help <command>.

No comments:

Post a Comment