How to Fix "Permission Denied" When Updating on Ubuntu Terminal? - Fosslicious

Tuesday, November 12, 2019

How to Fix "Permission Denied" When Updating on Ubuntu Terminal?

Yesterday, when I saw the Ubuntu forum in my country, I read that someone asked about an error. The user complained that he could not update the ubuntu through the terminal. He gets an error like the picture below!.
How to Fix Permission Denied When Updating on Ubuntu Terminal?
How do you respond as a Ubuntu user who is familiar with this distribution?

Maybe you will assume that the problem above is easy and trivial. But it's different from users who are just starting to learn Ubuntu. Believe it or not, the error questions like the picture above are really asked by new Ubuntu users who are members of the forum.

Many responses from members of the group who answered well and did not underestimate the question, even though how to resolve the error above is easy, for those of us who are accustomed to using Ubuntu.

Okay, let's explain for the new Ubuntu users how to solve this problem!.

The screenshot above is an error when I haven't added the "sudo" (Superuser do) command, to the Ubuntu terminal. So, in Ubuntu, when we want to command something on the system that is related to the file system directory on Ubuntu, usually the user will be asked to execute the command as root(superuser). Because the one who has user privileges in that directory is Superuser.

And in this case, to update Ubuntu packages through the terminal, there is an error in the terminal due to "Permission Denied". We can see in the screenshot above, that the command goes to the /var directory.

The / var directory is a part of the file system in Ubuntu, so it requires user privileges as a superuser in order to execute commands in that directory.

Therefore, when a user wants to update a package, the sudo command must be added, sudo apt update is updated, and requires an authentication password. After the password typed by the user matches, the system will update according to the command.
Updating on ubuntu terminal
You can also just type apt update when you want to update ubuntu via the terminal. But to be able to execute it, you need to go into the root with the sudo su command first. Hopefully useful and ENJOY.

No comments:

Post a Comment