So you are typing along on the console and press enter to run a command just to have a permission denied message pop-up. You forgot to run sudo. Instead of typing sudo and the entire command over again just type sudo !! and press enter. You will be pleasantly surprised that the command you just ran appears after sudo. All common shells have this quick shortcut. It can be used at anytime and in any commands. Just another little shortcut that makes life a little easier.

Leave a Reply