~/ 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/76389578-61e2-40a6-8e41-606a62a4d097/flashcard utf-8 LF