Is it possible to extend the time i’m logged as administrator when enter sudo mode from the console

sudo

Is it possible to extend the time i'm logged as administrator when enter sudo mode from the console?
If yes, how?

Best Answer

In the terminal type this to open a file to edit:

sudo visudo

Find this:

Defaults        env_reset

And replace with this:

Defaults        env_reset,timestamp_timeout=NUMBER

Where NUMBER is the number of minutes to time-out.

Then save the file.