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:
You will be prompted to submit your root password, then the command will run properly.