最佳答案
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 like:
S() {
sudo $(history 1)
}
Any ideas?