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
Surprisingly enough, people are not always aware of this.