If you executed a command and neglected to use sudo, you can execute “sudo !!” to re-execute the previous command with sudo prepended.

Source: unknown, ubuntu-server-tips package

Related stuff