Bash Idle Timeout

I’ve set an idle timeout on the development server at work in an attempt to cut down the number of sessions that have been left logged in on unattended PCs. It was really easy to set up!

You can set this in /etc/profile but I realised that ours just includes a file /etc/bash.bashrc so I added my line to that:


# set the idle timeout - logs you out after an hour
TMOUT=3600

New sessions logged in after this will automatically log themselves out after one hour of continuous inactivity.

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.