Ubuntu – What does `!!` mean in `sudo !!`

command linesudo

I am a user of Ubuntu with not much experience and I have been using sudo.

What does sudo !! do and how?

Best Answer

!! in bash is an alias for the previous command (see Event Designators). So it re-runs the previous command with sudo permissions.

Related Question