You wanted to give a command as root but you forgot to use sudo ? Don’t worry with this command you’ll use the history combined with sudo, the argument !! has the same meaning that !-1 , so this command runs your last command as root.
Obviously this could be used also as
if you give another command after the one you want to run as root, but take care on which command are you running as root.