System Management
A user runs systemctl restart nginx at the prompt and receives a permission denied error because sudo was omitted. The user wants to rerun the exact same command with elevated privileges without retyping it. Which entry accomplishes this?
Show the answer
Correct answerC. sudo !!
The !! history expansion is replaced with the entire previous command line, so sudo !! runs systemctl restart nginx with sudo. The sudo !$ form is tempting, but !$ expands only to the last argument, which would run sudo nginx.