Q. How do I logout Linux user?
A. root or admin user can logout any user forcefully. If you are logged in as vivek and just wanted to logout or logoff, type logout command or hit CTRL+D:
$ logout
You will be logout of a login shell session or secure shell session.
Task: Linux logout user
If you would like to logout other users, you must login as root user. Next you need to use pkill command.
pkill command syntax
pkill -KILL -u {username}
To see list of logged in user type who or w command:
# who
OR
# w
# pkill -KILL -u sam
OR
$ sudo pkill -KILL -u sam
0 comments:
Post a Comment