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,
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.
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a Linux expert?
Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial