Setting up Sudo

I came from Ubuntu, and was very used to using "sudo" to execute commands which needed to be run as root. Here is an easy way of setting up sudo.

First, install sudo:
pacman -Sy sudo

Now edit the sudoers file (it is recommended to use visudo. If you know how to use vi/vim, you can use this instead)
nano /etc/sudoers
You can replace nano with your own favourite text editor.

Remove the hash on the line. From this:
# %wheel ALL=(ALL) SETENV: ALL
to this:
%wheel ALL=(ALL) SETENV: ALL

Now add your user to the wheel group so you can run sudo:
gpasswd -a [user] wheel

Now log out of root and log in to your user and you can now use sudo like in Ubuntu. The next step is to get rid of the root account. First, let's check to see if sudo is working. Try typing something into the terminal like:
sudo nano /etc/rc.conf
Tip!
When you type in your password, you won't get anything back (no asterixes or circles). Don't worry, it is still recognising your password

Disabling the root account

Information regarding next step
The next step will make it so you cannot use the root account, so su will output
This account is currently not available.
as well as "sudo -i". If this is not what you want, do not do this step.

If it works, you can now disable login for the root account. Open you /etc/passwd file using sudo with your favourite text editor, and find the line that says root, which looks like
root:x:0:0:root:/root:/bin/bash
change it to
root:x:0:0:root:/root:/sbin/nologin

Now you have disabled the root account, so you won't mess up your system as it is highly not recommended to use the root account for daily use.

Sudo tips

If you want to get into a root terminal using sudo, do NOT use 'sudo su'. Use
sudo -i