Popular
Latest Articles
- How to Secure your Cisco Router
- Creating CLI Views on a Cisco Router
- Configuring TACACS+ on a Cisco Router
- How to enable SDM on your router
- Build a Samba Server on Redhat / CentOS
- How to set the Time / Date and Timezone in CentOS
- How to install SSH on Solaris 10 x86
- ESX4 - How do I turn on/off a Virtual Machine from the command line ?
Bash / Korn - Change the default session timeout
Sunday, 22 February 2009 20:19
This short guide will show you how to set the default session timeout. We will set the TMOUT variable, of which is supported by both shells, Bash and Korn.
To check your current timeout setting, enter the following,
[root@localhost ~]# env | grep TMOUT
To change this setting globally edit the /etc/bashrc. To change this setting per user edit ~/.bashrc.
Below are the required settings you will need to add/modify to your bashrc file.
echo "TMOUT=300 >> /etc/bashrc
echo "readonly TMOUT" >> /etc/bashrc
echo "export TMOUT" >> /etc/bashrc
This will set your timeout to 5 minutes and also prevent anyone from modifying these settings.
We have 16 guests online