# sudo

`sudo` is the standard tool for gaining temporary system administrator privileges on Linux to perform administrative tasks. This eliminates the need to change the current user to `root` to perform these tasks.

To allow regular users to execute commands with elevated privileges, the configuration for `sudo` needs to be modified to allow this.

`sudo` supports configuration drop-in files in `/etc/sudoers.d/`. Using these makes it easy to modularize the configuration and remove offending files, if something goes wrong.

<p class="callout info"><strong>TIP:</strong> File names starting with <code>.</code> or <code>~</code> will get ignored. Use this to turn off certain configuration settings if you need to.</p>

<p class="callout danger"><strong>WARNING:</strong> Drop-in files are just as fragile as <code>/etc/sudoers</code>! It is therefore strongly advised to always use <code>visudo</code> when creating or editing <code>sudo</code> config files, as it will check for syntax errors. Failing to do so will risk rendering <code>sudo</code> inoperable!</p>

Create a new drop-in file at:

~~~bash
EDITOR=nano visudo /etc/sudoers.d/01_wheel
~~~

The contents of the drop-in file are as follows:

~~~
## Allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL
~~~

Save and exit.

Now every user who is in the `wheel` user group is allowed to run any command as `root`.