If you are Linux administrator sudo command comes in your every minute job and you may have noticed that if you run another command using sudo shortly after the first command, you are not prompted for your password again.
You can customize the length of that grace period in which you are not asked to enter your password for the sudo command again by changing a setting for the sudo command.
We will open the “/etc/sudoers” file and change a setting to customize the length of the grace period. To begin, press Ctrl + Alt + T to open a Terminal window. Type the following command at the prompt and press Enter.
Type the password and press Enter
Search for the following line:
Change the line by adding “, timestamp_timeout=x” to the end of the line.
This line will become like this
Defaults env_reset, timestamp_timeout=x
Here “x” shows the amount of time of grace period or the time you want to wait
x is in minutes