I have found recently that when running the Software Updater GUI it automatically, without asking for authentication, updates the local package list, but when running the equivalent in Terminal (apt-get update
, or apt update
) I get:
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
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?
So how come through the GUI way you can do the equivalent to apt-get update, and have it run without it asking you for authentication, and in Terminal by simply typing the commands, you cannot?
Is it that the two processes are in fact slightly different, and I am misunderstanding something? Or what? How can I sort of simulate this behaviour in Terminal so that I can run the update command without the GUI (or possibly with if absolutely necessary) and without authentication?
pkexec apt-get update
maybe. – Tim Aug 17 '15 at 21:41