How to set or disable auto-logout on bash shell

Following information is intended for bash shell only.
The system variable TMOUT can be set to specify the amount of time the user is inactive before the user is automatically logged out.
Set the following listed below in the /root/.bashrc file: TMOUT=XXX #
The system will logout the root account after one hour of inactivity. The value entered for the TMOUT= variable is in seconds. To represent 1 hour, we have to multiply as follows: 1 hour is 60 minutes. 60 minutes * 60 seconds = 3600 seconds.
After setting the parameter, the intended user will need to log out and then log in for the changes to take effect. To make modifications apply to all users on the system, specify the TMOUT variable in /etc/ profile.
To disable auto-logout simply comment out or delete the line with TMOUT value

Provided by:Forthscale systems, cloud experts

Comments

sandipon.duet said…
To disable auto-logout, just set the TMOUT to zero or unset it as follows:

$ export TMOUT=0
or
$ unset TMOUT

Popular posts from this blog

How to install PGPool II on PostgreSQL Servers in master-slave architecture + PGPoolAdmin web managment

Setting Filezilla Server on Amazon EC2 instance with passive ftp