Wanted to run a command in sudo context but forgot that. What do you do usually?
- Hit the up arrow
- Press ctrl+a or HOME button
- Type sudo and hit ENTER.
There is a geekier way to do this. 🙂
$ sudo !!
Bash will expand the two exclamation points to the previous command and it will be run through sudo.