← #75 Unpack a property of an object with different name

Run the last command as the root user

Topics: Command Line

We often see an error when executing a command that requires the root user permission. For example, installing a npm package as global probably requires sudo:

$ npm install -g package-name

In order to sudo the previous command, usually we press the Arrow key, append sudo to the beginning of the command and run it again.

It turns out that there is an easier, shorter command:

$ sudo !!

Here !! references the last command.

Fix a typo or suggest an improvement
#77 Checkout the previous branch