HOWTO Automatically logout your UNIX shell

This article is incomplete and was first written in June 2007
for the BeezNest technical website (http://glasnost.beeznest.org/articles/358).

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.

Bash

TMOUT (expressed in seconds)

export TMOUT=300

Tcsh

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.

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *