sudo
It’s a program that allows to execute commands as another user, often as root.
# Commands
sudo -k- reset the timer that doesn’t require password to usesudosudo -v- disable password prompt for current sessionsudo -l- listsudoprivilegessudo -lU username- listsudoprivileges for other users
# sudoers file
sudo is configured through /etc/sudoers. You should never edit it, use visudo instead!
Defaults requiretty - doesn’t allow to sudo from scripts
# Useful
- How To Edit the Sudoers File
- 10 Useful Sudoers Configurations for Setting ‘sudo’ in Linux (logging, etc.)