How to Change Sudo Password Timeout in Ubuntu, Linux Mint

Last updated: August 29, 2013

As you may know, when you’re running commands in terminal with sudo at beginning, you have to enter user password to get past. Within a certain time, you don’t need to enter the password again to run another sudo command.

The default timeout is about 5 minutes, here’s how to change it in Ubuntu 13.10, Ubuntu 13.04, Linux Mint and Elementary OS.

To get started, press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run below command to edit the config file:

sudo visudo

Use the arrow keys to scroll down and find out below line:

Defaults env_reset

Change it into:

Defaults env_reset, timestamp_timeout=10

Replace 10 with other number of minutes as you want.

change sudo password timeout

After that, press Ctrl+X and followed by Y to save the changes.

That’s it. Enjoy!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

One response to How to Change Sudo Password Timeout in Ubuntu, Linux Mint

  1. Thanks for the password time out on my Mint 16.

    Ray