HOWTO Automatically logout your UNIX shell

This article is incomplete and was first written in June 2007
for the BeezNest technical website (
To ensure a shell left open automatically logs out (kicks the user) after a certain idle time, most recent shells implement its autologout. Just set the right environment variable and you're done! The following two expressions are equivalent.


TMOUT (expressed in seconds)
export TMOUT=300


autologout (expressed in minutes)
set autologout=5
But maybe what you are looking for is something to lock the console (or terminal) after a certain idle time? In this case, just use vlock.