How to change the number of minutes that the sudo password is cached

This is a really QUICK TIP!

When you run any command as root, using sudo, the password is remembered for 15 minutes by default.
If you want to change the time that the password is cached, open the terminal (as root) and run:

editor /etc/sudoers 

Find this line in the file:

defaults env_reset

And change it into:

defaults env_reset , timestamp_timeout=x

where “x” is the time in minutes that the password will be cached.

Save and exit and work is done!

Default image
Swedish Viking, also known as the NAT King (by others). Owner of and part of the administrator team of LowEndSpirit.
Articles: 8

Leave a Reply