Linux Error 13: Permission denied, are you root

Linux error

This Linux Error 13 error simply means you are not the root user.

me@linuxbox ~#apt-get update
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?
simply install it using the sudo to install any package as a root user.
This occurs because you are using a normal user account

The encountered error message, “E: Could not open lock file /var/lib/dpkg/lock – open (13: Permission denied),” typically occurs when trying to perform package management tasks in Linux without the necessary root privileges. This issue, often denoted as “Linux Error 13,” indicates that the system is preventing access to the essential dpkg lock file, which is crucial for managing software packages.

To resolve this error, ensure that you have superuser privileges by using the “sudo” command before the package management operation. For instance, you can employ the following command: “sudo apt-get update” to refresh the package list. By appending “sudo” to your package management commands, you gain the necessary authorization to access system files and overcome the permission denied obstacle.

Remember, maintaining proper permissions is vital for a secure and stable Linux system. So, whenever you encounter “Linux Error 13,” simply prepend “sudo” to your package management commands to ensure successful execution.

You forgot the sudo for the second command.
me@linuxbox ~#sudo apt-get update && sudo apt-get upgrade will work.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x