In a Bash terminal, I often type a command and realize that I needed to sudo that command. I hit the up arrow to get the previous command and then backtrack to the beginning type sudo and enter.
Is there any way to type sudo, then press a key to pull down the previous command after sudo?
Thanks!