7 Ways to logout from linux shell
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.
- logout
- exit
- CTRL+D
- 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/
- http://bloggerdigest.blogspot.com/2006/12/linux-auto-logout-after-idle-few.html
- http://linux.about.com/cs/linux101/g/tmout.htm
USE THE COMMANDS ABOVE AT YOUR OWN RISK!
NO RESPONSIBILITIES ARE TAKEN!
No comments:
Post a Comment