To terminate sessions after a period of inactivity, use the following shell variables:
TMOUT If set to a value greater than zero, the value is interpreted as the number of seconds to wait for input after issuing the primary prompt. Bash terminates after waiting for that number of seconds if input does not arrive.
The autologout shell variable can be set to log out or lock the shell after a given number of minutes of inactivity.
- set autologout=minutes
- The Bourne shell has no TMOUT variable nor equivalent .