1. Open a terminal and type:
  2. In the file that open, scroll down till you see the line: Change it to where X is the time (in minutes) that the sudo password will timeout. You can set X to the value you want.

Note:

If you set X to “-1”, it will revoke the password prompt, which is not advisable. If you set X to “0”, the system will prompt you for password everytime you use the “sudo” command

  1. Press “Ctrl + x” to exit. Don’t forget to press “y” to save the changes.