SUDO !!

sudo !!

 

 sudo !!

You are going to really thank me for the next command if you don’t already know it because until you know this exists you curse yourself every time you enter a command and the words “permission denied” appear.

  • sudo !!

How do you use sudo !!? Simply. Imagine you have entered the following command:

apt-get install ranger

The words “Permission denied” will appear unless you are logged in with elevated privileges.

sudo !! runs the previous command as sudo. So the previous command now becomes:

sudo apt-get install ranger