Thursday, 5 March 2015

Tips: Execute Last Command as Root

I've lost count of the number of times I've run a command only to be told 'Permission denied'. Sometimes these commands have been quite long so it's a royal pain to re-type. However, a quick and easy way is to use !! to rerun the last command.


sudo !!

This runs the last command but pre-pended with sudo.

No comments:

Post a Comment