Fixing the Sudo Timeout

So I can find it again, the way to change the sudo timeout for a particular user (that would be me) involves adding a line to the /etc/sudoers file using sudo visudo, thusly:

Defaults:       ed timestamp_timeout=90
# blank line to make the underscore visible

Note the colon! Should you add the timeout to the global Defaults env_reset line, then everybody gets a monster timeout, which may not be what you want.

You can change the default editor (nano in Ubuntu) thusly:

sudo update-alternatives --config editor

Or, in Arch / Manjaro, add a stanza:

Defaults	editor=/usr/bin/nano

Because my vi hand is weak:

  • :wq to save & exit
  • :q! to bail out
  • i and a at cursor, I and A in line
  • o and O at line
  • back to command mode

That’s all I need to insert the proper stanza & move on.

One thought on “Fixing the Sudo Timeout

Comments are closed.