1

I am a new Linux user, in fact I just got Linux about 2 hours ago, and I see that I don't have many permissions when executing commands in the terminal. Sometimes, I might try to install something or execute a command inside of the terminal (it can happen at any time), and it says "Permission Denied." Other times, it says, "Permission denied. Do you have root access?" or something along the lines of that. Is there any way to fix this? I can't seem to find any solutions online towards this problem, only people who make brand news accounts and they get root access. I can't even give permissions either.

Edit: I have figured it out and everything is back to normal. I can now run sudo commands and install applications and do everything else.

3

If you try to install some applications without privilege as an administrator, you may use:

apt install <the name of the program>

and hit enter. However, for many packages, you'll need, as you said, root privileges. In this case, you must type:

sudo apt install <the name of the program>

and hit enter. For this last situation, the prompt will ask you for your administration password. Type it and hit enter. You might verify that no characters appears as you type, it is totally normal.

"sudo" is the abreviation for "super user do".

| improve this answer | |
  • 1
    The administration password is your user password you used during installation. – Stephen Boston Jun 16 at 5:38
0

It's just because of permission not correctly set for the file or directory.

use ll or ls -la and find out the permission set and the user who is having access for the file. If the file or directory is created by the user and doesn't meed any root access intervention for it just set it using chmod and chown

ls -la /* file or directory */

-rw-r--r-- 1 root root 1431 Jun 15 15:22 file

rw and r are the permission such as read and write and root is the user assigned for the file. if you change the file access from root to your user without sudo you can access the files. To change the user use the chown command

chown USER:GROUP FILE

Note: If you make the system files to user access it might crash the system.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.