How do i set a system wide terminal idle timeout on redhat?

  • The /etc/profile is the system wide file for environment and startup setup.

    You can add the following in the file to automatically logout idle terminal sessions. Depending on the type of server you have for instance if you know only application users and not developers use the terminal sessions, this might be a good idea. For development & test systems probably best to leave it to the users themselves to configure the settings at a local level, if the want to.

    To configure automatic idle timeout of terminal sessions at a system wide level. Add a file in /etc/profile.d called and add these lines.

    trap "" 1 2 3 15
    export TMOUT=30
    readonly TMOUT

    The changes will take effect on next login.

    The trap signals are:

    SIGHUP 1 Hang up detected on controlling terminal or death of controlling process
    SIGINT 2 Issued if the user sends an interrupt signal (Ctrl + C)
    SIGQUIT 3 Issued if the user sends a quit signal (Ctrl + D)
    SIGTERM 15 Software termination signal (sent by kill by default)

Log in to reply

© Lightnetics 2019