0

how to log out the users from command-line

In my machine nearly 4 users were logged in.... Is it possible to log-out in command-line from root user....

Kill, Pkill and Killall Add a comment
alexander
asked Feb 06 2017

Answer

0

Yes, pkill command can be used to do this...

For example: If user1 is logged in and to logout from command-line, below command can be used...

# pkill -KILL -u user1

While this command is executed user1 will be logged out.

NOTE: the thing to be noted is this command needs root privilege.

Add a comment
jagannatharumugam
asked Feb 07 2017
edited Oct 05 2018
Post your Answer