Re-run last command in terminal using sudo

Why didn’t I find this sooner?

To re-run the last command in terminal use
!!
which becomes _extremely_ useful, if you forgot you needed root access
sudo !!
(read: sudo damnit! ;) )

About Florian Beer

I am running my own company 42dev where I provide web application development & hosting services for my clients.

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>