7 Ways to logout from linux shell

Friday, 12 January 2007

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.

  1. logout
  2. exit
  3. CTRL+D
  4. export TMOUT=1
  5. fuser -k `pwd` ( Don't do this as ROOT!!! )
  6. skill -KILL -u `whoami` ( Don't do this as ROOT!!! )
  7. kill -9 $$ ( Don't do this as ROOT!!! )
Notes:
TMOUT - turns on autologout feature and if there is inactivity for NNN seconds the user is logged out from the shell.
Credits
Disclaimer
USE THE COMMANDS ABOVE AT YOUR OWN RISK!
NO RESPONSIBILITIES ARE TAKEN!

 Digg  Del.icio.us  Reddit  SlashDot

No comments: