By default, the console timer have 5 minutes (some distros have a 15 minute block time). This mean that each time you execute the ""sudo command"", you can use it without typing the password, but, only in that 5 minutes time block; after that, you need to enter your password again.
This protection is very useful; you don't want nobody in your system while you're absence. But if you're working all the time in the Linux Terminal, you'll need this session be longer. In this article you'll learn how to set a time limit for your "superuser do" session.
Remember: this modification could be a risk for you system integrity, if you work with other people and you walk away from your workspace, don't do this or just kill session.
You only need to add an order to the "sudoer" file (default sudo security policy plugin located at /etc/sudoer); open sudoers with visudo commando or just open the file for edit:
sudo nano /etc/sudoers
Will show the following screen
In default options we need to add this:
Adding the value «0», will disable the timer and the system always request a password.
The value works in minutes; if we want to delay the session to 20 minutes we've insert this:
You can add the value in the same line at default propierty(separating value with a comma (,):
Just save the setting and close the editor.
Finishing sudo session just type:
You can keep the sudo session opened (at least you close the terminal or typing exit):
You´ll be in the superuser session without typing sudo command.