For the sake of security, Ubuntu will disable the root account by default from the beginning of system installation. All operations that require the administrator can be replaced by The sudo command. The default sudotimeout time of Ubuntu is 5 minutes. Of course, if you feel that the time is too short or you are tired of entering the password, you can change the default timeout time of sudo as follows: sudodomaindo find the following line defasensenv_res
For the sake of security, Ubuntu will disable the root account by default from the beginning of system installation. All operations that require the administrator can be replaced by The sudo command. The default sudo timeout time of Ubuntu is 5 minutes. Of course, if you think the time is too short or you are tired of entering the password, you can change the default timeout time of sudo as follows:
Sudo shortdo
Find the following line
Defaults env_reset
Change this behavior as follows
Defaults env_reset, timestamp_timeout = x
X represents the time. You can set it to 10 or 30, indicating 10 minutes or half an hour.
You can also set it to-1, so that you will remember the password before logging out or exiting terminal. In this case, you can run the following command to forcibly exit sudo for security considerations.
Sudo-K
For more tips, see man sudo