Sudo !!

How many times did you type a command and forgot to type sudo first ? What do you want to say when that happens ? No, not that…you might want to say : sudo !!

Sudo will understand you desperation and guess that you forgot him when you typed the last command. No, I’m not kidding. If you type "sudo !!", sudo will be invoked with the last executed command. This is exactly for those situations and it’s brilliant. I couldn’t find a better way to represent the feeling and at the same time solve the problem. It’s easy to forget sudo, but it’s hard to forget "sudo !!", when you forget the first one 🙂

Just a small tip for today, have sudo fun (that’s when you’re allowed to do what you always wanted) 🙂


2 responses to “Sudo !!”

  1. Chris Lees says :

    Thanks, I was under the impression that you just typed !!, and I was wondering why it wasn’t working for me.

    You can actually do it with other commands; like if you wanted to copy a file but forgot to put “cp” at the beginning, you could put “cp !!” into the terminal next, and it will insert “cp” at the beginning of the previous command.

  2. Carlos Ribeiro says :

    Hmmm, I was wondering if it was a sudo feature. So now I know it’s a bash feature. Thanks

%d bloggers like this: