Skip to content

How to make a terminal remember sudo passowrd for ever

when you type sudo command for the first time in a terminal it will ask you the sudo password.
This password will be remembered by that terminal for 15 minutes by default.

If you want that terminal to remember your password for ever during its life time follow these steps.
1. Type at terminal

sudo visudo

2. Edit as shown below


Change

Defaults env_reset

to

Defaults env_reset,timestamp_timeout=-1

Dipin Krishna

Written by Dipin Krishna

Senior full-stack engineer with 15 years across Django, Laravel, SwiftUI and the infrastructure underneath. Available for contract work.

Work with me →

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.