HowTo: Linux / UNIX Unset TMOUT ( AutoLogOut )

I‘ve set the the TMOUT in the ~/.profile of the user account as well as in /etc/profile file on my UNIX or Linux servers. How do I unset the TMOUT variable? How to unset TMOUT temporarily under UNIX like operating systems?

UNIX or Linux login shells can be configured to automatically log users out after a period of inactivity. The TMOUT (under bash ) and autologout (under tcsh) variables defines auto logout time in seconds.

Bash Shell Unset TMOUT

You can set the TMOUT variable to 15 minutes (900 seconds) as follows:
$ export TMOUT=900
$ echo $TMOUT

To unset the variable type the following under Bash shell:
$ export TMOUT=0
$ echo $TMOUT

You can also use the unset command as follows under Bash shell:
$ unset TMOUT
You can also edit out ~/.bash_profile / ~/.profile or /etc/profile file and remove TMOUT entry. This will disable the TMOUT permanently.

TCSH Shell Unset autologout

To unset the autologout variable under the tcsh shell, type:
$ unset autologout


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz