How to execute the last command with Sudo

If you forgot to add sudo in your last command, you don’t need to type it completely. To execute ant last executed command by as superuser:
sudo !!
Also, The double exclamation point will repeat the last command. This could be useful when you’ve already executed a very long command and don’t wanna re-type it again.
References
About the author
Hey, y’all 🖖🏽 I am a passionate self-taught developer, open-source advocate, and tech enthusiast with a hands-on approach to problem-solving and an unending thirst for knowledge. Anything and everything classified as technology fascinate me.
Comments
Join the discussionNo comments yet. Be the first to comment.






