0

I love the idea behind the command:

sudo!!

but it doesn't really work on ubuntu (14.04 and earlier).

When I type

apt-get install htop

It will obviously tells me to run the command as super user. And therefore I should be able to run this:

sudo!!

which would execute the command

sudo apt-get install htop

but instead it tells me that it couldn't find the command

sudoapt-get

Which basically means that it doesn't put a space after the sudo keyword. Why is that? Am I using the command wrong? I am very certain that I get the expected behaviour on Fedora.

1
  • 1
    Probably Fedora is so clever that put spaces where you are too lazy to use them. :) ...Don't be so certain; this probability is 0. Aug 17, 2014 at 0:08

1 Answer 1

8

It's

sudo !!

and not

sudo!!

Bash expands the !! exactly - it doesn't add spaces where there were none.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .