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

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

About Oltjano Terpollari

Oltjano Terpollari is a very passionate computer geek studying python, linux, netcat power tools and living a binary life. He goes by the nickname Ambition and is very happy living a science life. He also loves technical blogging and sharing his knowledge with others.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.