I often forget to run commands with sudo. I\'m looking for a way to make a bash function (or alias) for repeating the last command with sudo. Something
sudo
You can write:
sudo !!
(See §9.3 "History Expansion" in the Bash Reference Manual.)