You open your terminal and try to execute some privileged commands and you got to add sudo to it. Like, for example, when you have to change permissions you use 'sudo chmod 777 file.txt'. And then it asks for your password. But once you do it, it won't ask you for the password for the 'sudo' commands that you enter in the next 5 minutes. 5 minutes is the default timeout period for which time the terminal is going to remember your password. If you want to extend it then here's how.
You need to edit the sudoers.tmp file. For that, go to your terminal and type this :
gksudo gedit /etc/sudoersFind the line that says :
Defaults evn_resetChange it into
Defaults evn_reset , timestamp_timeout=xwhere x is the timeout period in minutes.
If you want your terminal to remember your password for as long as you are not logged out or close window, then keep the value of x as -1.