How to Change Sudo Password Timeout in Ubuntu, Linux Mint

August 29, 2013 — 1 Comment

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!

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to ubuntuhandbook1@gmail.com

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

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>