sudo !! - run the previous command as super user

by picockpit
GNU/Linux ◆ xterm ◆ bash 132 views

Frequently you’ll find yourself forgetting sudo before a command which needs to be run as root (installing packages, for example). sudo !! makes your life easier by simply running the previous command as root.

Part of our compilation of “Ultimate List of unusual but really useful Linux shell commands”, which you can check out here:

https://picockpit.com/raspberry-pi/ultimate-list-of-unusual-but-really-useful-linux-shell-commands/