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.
1 thought on “Rerun the last command with sudo on the Linux shell”