RSS Feed

Sudo !!

Do you ever find yourself writing commands that can only be ran as root without being the root user or prepending the command with sudo? It’s annoying isn’t it!

Well there is a way to run the command through sudo without having to rewrite or prepend the command with sudo. It’s simple, use double exclamation marks to represent the previously entered command:

/etc /init.d/apache2 restart
sudo !!

Surprisingly enough, people are not always aware of this.

Posted in Linux on the 27th February 2010


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