Sometimes, when you’re working in the command line, you need to enter “sudo” to assume root privileges for a given task. You may not always remember, but one little trick can save you from retyping your last command with “sudo” prefixed to it.
Just type this:
This will initiate the previous command with sudo in front of it, and you’ll be immediately asked for your password. This saves you a good amount of frustration — at least if you make this mistake as often as I do.
For more awesome time-saving shortcuts, check out our guide.