Repeat last command with "sudo"
You can write:
sudo !!
(See §9.3 "History Expansion" in the Bash Reference Manual.)
Not enough?
sudo !!
if you want the S
simply put:
alias S=sudo
and use it
S !!
the !!
mean the last command
You can write:
sudo !!
(See §9.3 "History Expansion" in the Bash Reference Manual.)
Not enough?
sudo !!
if you want the S
simply put:
alias S=sudo
and use it
S !!
the !!
mean the last command