Is there a BSD equivalent to "!!"?

Posted by CT on Super User See other posts from Super User or by CT
Published on 2011-03-07T13:57:26Z Indexed on 2011/03/07 16:12 UTC
Read the original article Hit count: 182

Filed under:
|
|
|
|

I often find myself issuing a command that I do not have the proper elevated privileges for.

On Ubuntu I could use

sudo !!

This would issue the same command with sudo privlidges. Is there an equivalent on OpenBSD?

Edit: I should have been more specific on what version of OpenBSD. I am using OpenBSD 4.8 where sudo seems to be installed by default. I have already created a user besides root and edited my sudoers file to allow for that user to use sudo.

My question is, is there already a built-in shortcut for the "!!" to use previous command.

© Super User or respective owner

Related posts about linux

Related posts about command-line