If sudo is already installed, skip this section and the next section. If you do not want to install sudo, you can use su -l to login as root to install Wine. If you do not know whether sudo is installed, execute the following command. It will either work or not work.
$ sudo echo "Hello"
Open a console window and login as super user.
$ su -l
# pacman -Syu
# pacman -S sudo
In order that you have sudo rights, you must edit /etc/sudoers using visudo. The following will open /etc/sudoers for editing with nano. If you prefer vi, skip the export.
# export EDITOR=nano
# visudo /etc/sudoers
In the editor, insert into the section titled
## User privilege specification
the following line, but substitute your username for USER_NAME.
USER_NAME ALL=(ALL) ALL
After exiting from the editor, log out of the root account and close the Terminal window.
Close any open apps.
In order to activate sudo for your user name, Restart your Computer.
When logged in again, continue from here to verify sudo is installed and properly configured.
-------- Waiting for computer to restart --------
To verify you can now use sudo, open a Terminal session and issue the following command.
$ sudo echo 'Hello'
The test is successful if, after requesting and receiving your password, "Hello" is displayed.
The multilib repository enables 32-bit apps to run on 64-bit installations. Many Windows apps are 32-bit or have 32-bit components, and even 64-bit apps often have installation .exe files that are 32-bit. Without multiarch, Wine would have limited value.
To enable multilib, use your favorite command line editor (nano, vim, emacs) to uncomment the [multilib] section of /etc/pacman.conf. If using nano,
$ sudo nano /etc/pacman.conf
and remove the leading # characters, yielding
Include = /etc/pacman.d/mirrorlist
After saving the file and exiting, complete the process with a full system upgrade.
$ sudo pacman -Syu
If there are conflicts with gcc-libs, consult the multilib section in the Arch Linux Wiki.
The next command will install Wine Stable. If you prefer Wine Staging, replace wine with wine-staging.
$ sudo pacman -S wine
wine-mono and wine-gecko support Windows apps that use .NET and Internet Explorer, respectively. If you install them now, you will not be asked to install them every time you create a Wine prefix.
$ sudo pacman -S wine-mono wine-gecko
The next command verifies the installation and displays version of Wine that was installed.
$ wine --version