sudo !! (pronounced sudo bang bang)
!! is used to repeat the last command.
If you forgot to give root privilege to a command instead of using up arrow, going to the beginning of a command and typing sudo you can just do sudo !!
!! is used to repeat the last command.
If you forgot to give root privilege to a command instead of using up arrow, going to the beginning of a command and typing sudo you can just do sudo !!