0

In this tip, we will see how to run a last command as root from the Terminal. This will be useful when forgetting to type the "sudo" command.

Here is an example:

Let's suppose we typed in the terminal this command:

apt-get install mypaint

Here is the output you will get:

~$ apt-get install mypaint
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

To repeat the same command with root privileges, run simply this command:

sudo !!

You will be prompted to submit your root password, then the command will run properly.

That's it!

Post a Comment

 
Top