How many ways do you know that one can use to log out from a Linux/UNIX bash shell ?
Please, be aware that some of the commands are DANGEROUS if you're logged in as ROOT because they may and will stop services/daemons that usually run as ROOT.
Here are at least 7 commands that you may use to log out.
- export TMOUT=1
- fuser -k `pwd` ( Don't do this as ROOT!!! )
- skill -KILL -u `whoami` ( Don't do this as ROOT!!! )
- kill -9 $$ ( Don't do this as ROOT!!! )
TMOUT - turns on autologout feature and if there is inactivity for NNN seconds the user is logged out from the shell.Credits
- Julian Lishev (fuser command) - http://proscriptum.com/
USE THE COMMANDS ABOVE AT YOUR OWN RISK!
NO RESPONSIBILITIES ARE TAKEN!