How to kick off a user on a Linux box?

I want to kick off a user such as “bob” on a Linux box which I managed remotely. How to do this?

bob may log on the Linux box by various ways:

  1. Log on the screen on the Linux box (locally) with a X server.

  2. Log on remotely by a ssh shell.

  3. Log on by ssh -X with X windows.

  4. Started a vnc session and log on it.

I am managing the Linux box remotely via a ssh session (I have root password).

Just do this:

# killall -u bob

It will kill all processes that user bob owns.

Check the manual of killall for more information: killall manual.

Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *