Is there a way to 'time out' a root shell (for example, in gnome-terminal
) so that after a certain amount of time not issuing any commands, the shell exits?
I'm searching for a solution that works in bash
on Fedora, and in ksh
on OpenBSD.
bashksh
Is there a way to 'time out' a root shell (for example, in gnome-terminal
) so that after a certain amount of time not issuing any commands, the shell exits?
I'm searching for a solution that works in bash
on Fedora, and in ksh
on OpenBSD.
Best Answer
You can set set the
TMOUT
variable to a number in seconds that you wish for bash to wait before automatically logging out the shell if no command is run.