Configure BASH, KSH, TCSH, ZSH Shell To Logout User Automatically After Idle Time
Q. How can I configure the bash shell to logout any user automatically after a period of idle time under Debian Linux or any other UNIX like operating system?
A. BASH, zsh, and ksh allows to logout all ideal user using a shell variable.
bash, zsh or ksh shell
set TMOUT variable in seconds.
tcsh shell
set autologout variable in seconds.
Append following line to your shell startup file (bash/ksh/zsh):
export TMOUT=300
If you are using tcsh, enter:
set autologout=300
E-mail this to a friend
Printable version
Related Other Helpful FAQs:
- Linux logout user or logoff user commands
- Linux logged out a user automatically
- Environment variable changing on Linux/FreeBSD
- Create and change to a new directory in a single shell command
- chkconfig on FreeBSD to start services automatically initial boot time
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: Bash, BASH Shell, csh, export TMOUT, ksh, Linux, operating system, set autologout, shell time out, tcsh, UNIX, zsh



Recent Comments
Yesterday ~ 3 Comments
Yesterday ~ 7 Comments
Yesterday ~ 4 Comments
Yesterday ~ 8 Comments
Yesterday ~ 45 Comments