On Mac, how do I give myself permanent sudo privleges?

Not exactly experienced in OSX, but it seems to be located in either one of the following:

  • /etc/sudoers
  • /private/etc/sudoers

It is recommended that you use visudo to edit the file but you can use another text editor.

Under the line that says root ALL=(ALL) ALL

You add the name of the user and user ALL=(ALL) ALLto give yourself permanent sudo privileges.


You can, of course, edit /etc/sudoers manually to accomplish this.

But Mac OS X's System Preferences has a method built-in to achieve the same thing: Give the user an Administrator account, instead of a Standard account, and it will be added to /etc/sudoers as sudoer automatically (via the wheel group membership).

Users will still need to enter their own password though, which is a good thing (tm).


sudo in OSX is exactly like that under Linux, and like Linux man sudo shows the details

sudo determines who is an authorized user by consulting the file /private/etc//sudoers.

/etc is a symbolic link to /private/etc so your suggestion of /etc/sudoers will work.