HowTo: Linux / UNIX Unset TMOUT ( AutoLogOut )

https‮‬://www.lautturi.com
HowTo: Linux / UNIX Unset TMOUT ( AutoLogOut )

TMOUT is a shell variable that is used to specify the number of seconds of inactivity after which the shell will automatically log out the user. It is commonly used to prevent abandoned terminal sessions from consuming system resources.

To unset the TMOUT variable, you can use the unset command in the bash or ksh shells.

For example, to unset the TMOUT variable in the bash shell, you can use the following command:

unset TMOUT

This will unset the TMOUT variable and disable the automatic logout feature.

Alternatively, you can set the TMOUT variable to a very large value, such as 99999999, to effectively disable the automatic logout feature.

For example, to disable the automatic logout feature in the ksh shell, you can use the following command:

TMOUT=99999999

This will set the TMOUT variable to a very large value, effectively disabling the automatic logout feature.

It is important to note that the changes made to the TMOUT variable will only be in effect for the current terminal session. If you want to disable the automatic logout feature permanently, you will need to set the TMOUT variable in your shell configuration file.

For example, to disable the automatic logout feature permanently in the bash shell, you can add the following line to your ~/.bashrc file:

unset TMOUT

This will unset the TMOUT variable every time you start a new terminal session, effectively disabling the automatic logout feature.

For more information about the TMOUT variable and how to use it, you can consult the documentation for your specific Linux or Unix system.

Created Time:2017-10-29 22:08:44  Author:lautturi