Sudo timeout
sudo asks your password , not the root pasword
it will then check if your account has sudo priviliddges
By default, a sudo session lasts for 5 minutes
(on some distributions, e.g., Ubuntu, it is 15 minutes)
During a ‘sudo session’ you will only need to enter your root password once in the terminal tab you’re working
Any time you run a sudo command during this time it will run without asking password.
To change the sudo timeout on Linux use the sudo visudo command.
The visudo command enables you to edit the sudoers file f from the terminal, using your distro’s default command-line text editor.
- Open a new Terminal window
- Run:
sudo visudo - Find the uncommented line:
Defaults env_reset - Under this line type:
Defaults timestamp_timeout=<time-in-minutes> - Save the changes (
ctrl+oin Nano) and exit (ctrl+xin Nano)
Replace <time-in-minutes> with a number corresponding to the amount of minutes you want the sudo timeout period to last. For example, if you want the timeout to last 60 minutes, the line should read: Defaults timestamp_timeout=60.