~/ learn/ comp-325/ cards/ Why you do not log in as root
1 of 7

Ask what you are allowed to do, then do one thing

Ask what you are allowed to do, then do one thing

Answer

sudo -l sudo systemctl restart nginx sudo -k

`sudo -l` prints the policy that applies to you, which is the honest way to find out what you may run rather than guessing. `sudo -k` forgets the cached credential immediately instead of leaving the grace period open on a shared machine.

sudo(8), sudoers(5) — sudo 1.9

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e3e1afe9-7d76-4986-bf7e-cb2384665a70/flashcard utf-8 LF