sudo
sudo (su do) allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments. sudo operates on a per-command basis, it is not a replacement for the shell.[1]
- sudo [EN] @ Fedora Package
Documentation
- man 1 'sudo' [EN]
- man 1 'sudo.conf' [EN]
Further information
- 7 Sudo Tips and Tweaks for Linux Users (05.12.2023) [EN] @ It's FOSS
Syntax
sudo [PARAMETER ...] [COMMAND [PARAMETER ...]]
Parameters
- -n, --non-interactive
- Avoid prompting the user for input of any kind. If a password is required for the command to run, sudo will display an error message and exit.
Examples
- The following snippet ensures that sudo remains logged in until the end of the script
sudo -v
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>'/dev/null' &
References
- ↑ Project contributors. "A Short Introduction." sudo project. https://www.sudo.ws//about/intro/ (accessed 13.12.2023)