Linux Tip - How To Exit From Terminal After X Seconds Of Inactivity

January 3, 2014 | By
| Reply More

Dear linoxide geek,

In this tutorial we will teach you how to autoclose your terminal after a specified number of seconds of inactivity. Ok, open a new terminal because we have some work to do.

1. Run the following command to open /etc/profile for editing.

sudo vim /etc/profile

how to autoclose terminal fter a specified number of seconds of inactivity

2. Go at the end of the file and add the following.

how to autoclose terminal fter a specified number of seconds of inactivity

TMOUT=specify the number of seconds here
export TMOUT

how to autoclose terminal fter a specified number of seconds of inactivity

3. Now, run the following command to apply the new change

sudo source /etc/profile

how to autoclose terminal fter a specified number of seconds of inactivity

Filed Under : HOWTOS

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.