
Getting Started
Open the terminal and edit /etc/profile with this command:
sudo gedit /etc/profile
At the end of the file, enter these lines:
# Exit Terminal
TMOUT=900
export TMOUT
In TMOUT, I have set the terminal to exit after 900 seconds (15 min), set your own time in seconds. After saving your file, run this command to apply the new changes without the need to log out and log back in:
source /etc/profile