Run the last used command as root user

May 17, 2010 - Leave a Comment

Ever typed a nice fancy string command into the terminal and been frustrated to discover it must be run as a super user? No problem! Just type this command next:

sudo !!

This executes the last used command but through sudo, running it as the root user. No more retyping those lengthy complex strings! Helpful indeed.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: David Mendez in Command Line

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates