Main content: Set a connection timeout for the remote terminal (that is, how long the new instruction will be disconnected from the server and terminal)
[[email protected] ~]$ echo $TMOUT #--> view Tmout variables
[[email protected] ~]$ export tmout=10 #--> set tmout variable
[Email protected] ~]$ echo $TMOUT
10
[[Email protected] ~]$ wait for input timeout: auto Logout
Last Login:thu Jul 11:07:12 from 192.168.40.1
Welcome to Linuxgod ' s home
This is a lnmp ' testing server
#测试结果 #
With Echo Append side
[[email protected] ~]# echo "Exoprt tmout=300" >>/etc/profile #--> append the Set variable to the profile
[[email protected] ~]# tail/etc/profile #--> view/etc/profile last line
Exoprt tmout=300
[[email protected] etc]# source/etc/profile #--> Immediate effect
Edit with Vi,vim
[Email protected] ~]# Vi/etc/profile
#直接到最后一行里面添加 Export tmout=300 will do it.
[[email protected] etc]# source/etc/profile #--> Immediate effect
Linux Security essentials: Setting the System timeout