针对所有用户

  1. vi /etc/profile
  2. export TMOUT=900 # 设置闲置时间为15分钟,单位为秒;如果没有此行则直接添加进去
  3. ##wq保存退出
  4. source /etc/profile

针对特定用户(如针对user_1)

  1. cd /home/user_1/
  2. vi .bash_profile
  3. export TMOUT=900
  4. ##wq保存退出
  5. source .bash_profile