CentOS Linux Ubuntu

sudo bang bang

So a day or two ago a co-worker mentioned that you can do  sudo !! to execute the last command in your history as root. I had never heard of such a thing! My life has been changed forever!

Here I’ve been hitting the back arrow like a peasant just to put  sudo in front of a previous command.

Please use your new found powers responsibly.

By Luke

Linux Systems Administrator RHCSA, LFCS, ITIL v3 Foundations, RHCE RHEL 8.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.