0

I have been trying to create a folder in /etc in ubuntu 20.10 but it is showing mkdir: cannot create directory ‘wiki’: Permission denied the above error message. how to resolve this

Thanks!...

1
  • 1
    You would generally not create folders in /etc unless you are manually installing a package outside of your package manager. If you want to create a directory anyways, use sudo mkdir /etc/wiki to run the command as root which has access Commented May 12, 2021 at 22:16

1 Answer 1

1

You need to have root permission to create document. Your current user doesn't have root privileges. You can use $sudo mkdir /etc/wiki to create folder.

Another option is to add your user to sudo group. For example, your user name is 'ubuntu' the you can execute the following command to add user to sudo group

  • $ sudo usermod -aG sudo ubuntu

To verify user belongs to Sudo Group

  • $ groups ubuntu

Output

  • ubuntu : ubuntu sudo

Once you have added your user(ubuntu) to Sudo group, you don't have to use sudo with every command.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.