Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed Arch. Works great. I created a new user, logged in with it and now I'm trying to install several thing with pacman. But I keep getting the error: error: you cannot perform this operation unless you are root. I can use pacman with root just fine, but it there a way to allow my new user to perform these actions?

I tried logging into root and using gpasswd:

gpasswd -a jack root

but that didn't do anything.

share|improve this question
As a general note, the Arch Linux wiki is really useful and detailed. – Alex Chamberlain Sep 1 '12 at 11:37
up vote 10 down vote accepted

You should read the Arch Wiki page on sudo.

sudo ("substitute user do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.

You can install sudo from the repositories and then configure it to allow your user, jack, access to privileged commands by editing /etc/sudoers. Make sure you do this using the visudo command.

To give the user jack full root privileges, you would add this line:

jack ALL=(ALL) ALL
share|improve this answer
Thanks so much, I need to read more. – Jack Stewart Aug 31 '12 at 23:30

What I usually do is enable root privileges for a specific group. That way you can just add users you want root privileges to that group.

Edit /etc/sudoers with visudo and add (or comment out):

%wheel      ALL=(ALL) ALL

Then add your user to that group:

gpasswd -a jack wheel
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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