Have you ever executed a command on the shell and noticed the that you had to run it with sudo? Instead of typing the command again with "sudo" in front of it, just run:

sudo !!

which will execute the command that was run before with sudo. Thanks to Planetfox for this tipp.

Rerun the last command with sudo on the Linux shell
Tagged on:

One thought on “Rerun the last command with sudo on the Linux shell

  • Pingback: Run same command again but as root

Leave a Reply

Your email address will not be published. Required fields are marked *

*