A common challenge for Windows users who switch to Arch Linux is that Windows software is not compatible with Linux, especially games. Linux has made great progress in gaming, but if you are fond of Windows games and programs, you need to set up Wine on your Arch Linux system to use them.
Wine is software using which you can run Windows applications on any of the Linux distributions. Wine doesn’t simulate Windows, but it translates its commands into Linux ones. So remember, Wine can’t be called an Emulator. Moreover, You don’t have to install Windows separately on your system, Wine will help you run Windows applications. Wine is free and open source. Anyone can improve and contribute to the development of the Wine application.
- How to Install Wine on Arch Linux?
- Install Wine Using Pacman
- Install Wine Using AUR Helper (Yay)
- GUI for Wine on Arch Linux
- Setting Wine Prefix to 32-Bit
- Running a Windows Program on Arch Linux Via Wine
To install Wine on Arch Linux, you can use the official package manager Pacman or download its AUR package using any AUR helper. Before installing Wine on your Arch system, the first step is to enable the multilib repository in your /etc/pacman.conf file. After that, you can easily install and manage Wine on your Arch Linux system.
Let’s proceed with Wine installation on Arch Linux using different methods.
Pacman is by default available in Arch to install packages. You can use it to install Wine from the multilib repository. But as mentioned earlier, begin by allowing the multilib repository in your /etc/pacman.conf file.
To install and run Wine on Arch Linux or its derivatives, follow the below commands:
You need to use the nano editor to access the Pacman configuration file and enable the multi library for Wine.
sudo nano /etc/pacman.conf
The multilib repository helps the Arch system to run 32-bit apps on your 64-bit system. This is because many Windows apps are 32-bit or use 32-bit components. Even some 64-bit apps have 32-bit installation files. Wine won’t work well without 32-bit apps.
Once the pacman configuration file is opened, find the below lines and uncomment them:
#[multilib] #Include = /etc/pacman.d/mirrorlist
To save the configuration file after removing the comments from the two lines, press Ctrl + O and then Enter. After that, exit the editor by pressing the Ctrl + X key.
After enabling the multilib repository, update the Pacman configuration file and system:
sudo pacman -Syu
The above command will synchronize the package database with the server. It also upgrades all the packages that are out of date. This is recommended before installing any new packages.
After updating the package manager, just install the Wine application by executing:
sudo pacman -S wine
This will install the latest development version of Wine, along with some optional dependencies that provide additional functionality. You can also install wine-staging AUR, which is a patched version of Wine with more features and bug fixes, but it may be less stable (Only for developers or testers).
You can install it by replacing the wine with wine-staging in the above command:
sudo pacman -S wine-staging
On Arch Linux, you can’t install Wine Stable. But you can still install Wine Development. For further knowledge, check out the ArchWiki Wine article.
Next, verify the installation once succeeded:
Wine can run .exe files, but if you want to run the HTML and .NET programs, you need to install two extra packages. Follow this command to get them:
sudo pacman -S wine-mono wine-gecko
These two packages, wine-mono, and wine-gecko, provide some of the functionality of Microsoft .NET Framework and Internet Explorer, respectively. These are needed for some Windows applications that rely on these components.
To remove the wine package and its dependencies, use the below command:
sudo pacman -Rns wine
This command will only remove the latest stable version of Wine Development. But if you want to remove the Wine along with two additional packages: wine-mono and wine-gecko, run:
sudo pacman -Rns wine wine-mono wine-gecko
AUR is the Arch User Repository, where users can submit and maintain their packages. Yay, a popular AUR helper simplifies the procedure of installing and updating AUR packages.
Keep in mind that by default, Yay is not available on Arch Linux. First, install the Yay on your system. After that, you can download the Wine AUR package using the Yay AUR helper.
Also, if you have not enabled the multilib repository in your /etc/pacman.conf file, first enable that. You can see more details in the first section of the article.
Before proceeding with the Yay installation, make sure your Arch system is up-to-date:
sudo pacman -Syu
Next, install the necessary tools for building a package. These two tools include the base-devel and Git packages:
sudo pacman -S --needed base-devel git
Here, the Git package will clone the repositories from sources such as AUR. The base-devel package contains all required tools like makepkg for compiling a package from source code.
After adding all the prerequisites to the Arch system, clone the Yay git repository:
sudo git clone https://aur.archlinux.org/yay.git
Now, change your current directory to the yay folder:
Finally, build the Yay package using makepkg:
You may get a permission error while installing the Yay package for the first time. This occurs because you do not have write permission for a directory, where you are trying to build a package.
To fix this, give directory permission to your main user account:
sudo chown -R user:user /home/user/yay
Replace the user with your system username. Now you have all permission to modify the Yay directory.
Yay is installed, check its version:
Installing Wine on Arch Linux Using Yay
Now, you can use Yay to install Wine from AUR by running the yay -S wine command:
yay -S wine
This will download and compile the source code of Wine and install it on your system. You are required to install some pre-dependencies manually or enable some options during the installation process.
Alternatively, you can install the stable or default version of Wine with this command:
yay -S wine-stable
The wine-stable version is the most tested and reliable, but also the oldest one. It may not support some newer applications or features. The command yay -S wine-stable does the same thing as yay -S wine since wine-stable is the default branch. To install the staging version, run the following command:
yay -S wine-staging
The wine-staging version is the most recent testing version, with experimental patches and features. It may support more applications, but it may also break some old ones or cause unexpected crashes.
After installation of Wine using Yay, run the given command to check its version:
To remove wine installed using yay -S wine, run:
yay -R wine
This will remove the wine package and its dependencies that are not required by any other installed package. Similarly, to remove the wine-stable, run:
yay -R wine-stable
To remove the beta or testing version, run:
yay -R wine-staging
A GUI (graphical user interface) for Wine can make it easier to configure and manage Wine settings. You can easily manage, run, and install Windows programs/software. There are several GUI options available for Wine on Arch Linux, such as:
Winecfg: This is the official GUI configuration tool for Wine. You can start it directly from the terminal by running winecfg command. It lets you adjust various Wine options, such as graphics, audio, and libraries.
To launch the wine configuration tool, run::
sudo wine winecfg
You will see a configuration panel for Wine. Using this panel you can adjust various settings for Wine, such as the Windows version, the drive mappings, the graphics options, and the audio options.
Wineglass: It is another GUI frontend for Wine. It is based on the Cocoa framework and uses AppleScript to communicate with Wine.
To install Wineglass, you can use any software manager like the GNOME app manager. Open the application manager and search for Wineglass GUI for Wine:
This window will open after the completion of installation.
If you want an updated and best GUI for your Wine, you can try the WineBottler. It is a replacement for the Wineglass and helps you install and configure various components for Wine on Linux.
Winetricks: A utility script that can fetch and set up different reusable runtime libraries. It can also download other components that are needed to run some Windows programs in Wine. It also has a menu of compatible games and apps/applications that it can install automatically.
To install Winetricks on Arch Linux, run:
sudo pacman -S winetricks
To run Winetricks, make sure the wine-mono package is installed on your system.
Alternatively, you can also directly open the Winetricks from the Wineglass settings menu.
Here you can create a new prefix for your Arch Linux system. You can add a 32-bit prefix to your Arch Linux system.
Wine prefix is a directory where Wine stores the configuration and data files for each Windows application. By default, Wine creates a 64-bit prefix in ~/.wine to run both 32-bit and 64-bit packages.
However, some applications may require a 32-bit prefix to work properly. You can create a 32-bit prefix by setting the WINEARCH environment variable to win32 and specifying a different prefix path with the WINEPREFIX environment variable.
For example, you can run the following commands from the terminal to create and configure a 32-bit prefix in ~/.wine32:
The above command will set the environment variable WINEARCH to win32, which tells WINE to create a 32-bit Windows environment.
Now run the below command to set the environment variable WINEPREFIX to ~/.wine32:
The above command will tell the WINE to use this directory as the prefix for the 32-bit environment. By default, this directory should not be present, otherwise an error will occur.
For opposite case scenarios, like to change to 64-bit, just change the 32 in the provided command to 64.
Finally, launch the Wine configuration tool:
This allows you to adjust various settings for the 32-bit environment, such as the Windows version, the drive mappings, the graphics options, etc.
To set the Wine prefix to 32-bit using the GUI method, you can use Wineglass or Winetricks. Both are a graphical front-end for Wine. Using these tools, you can easily install and manage different Wine prefixes, each with its settings and installed applications.
To set the Wine prefix to 32-bit using Wineglass, simply open it and add a new wineprefix by defining its value as equal to 32.
Your Wine configuration will be set to a 32-bit prefix.
Similarly, you can use Winetricks to set the wineprefix value to 32-bit. You can separately install Winetricks in your system or access it directly from the Wineglass interface.
Create a new Wine prefix and click OK.
Choose 32-bit architecture for Windows application installation and give a name to your new Wine prefix. After that, click OK to proceed.
Now, your Wine configuration will be updated to install a 32-bit Windows application.
To install a Windows program on Arch Linux using Wine, all you need to have is the installation file (usually a .exe or .msi file) of the program.
You can then run the installation file with Wine by right-clicking on it and selecting Open With Wine Windows Program Loader, or by running wine file.exe in a terminal.
You may have to adjust some settings in winecfg or install some additional components with Winetricks to make the program work correctly.
Here we are running the Rufus exe file. Click Yes to start Rufus in your system.
Rufus will start in Arch Linux using the Wine tool.
You can also run an executable file directly from the terminal with Wine.
The general format is:
For instance, if you have rufus-4.3.exe in your Downloads folder, you can type:
This will launch the Rufus program with wine.
You can install Wine on Arch in several ways. The method you use depends on the package manager you are using. You can either use the official package manager or an AUR helper to install Wine.
After installation, you can run Windows applications .exe files using Wine on your Arch Linux. You can also create and manage different Wine prefixes for different Windows applications. Wine can run many Windows programs on Linux, but not all of them. You can check the Wine Application Database or the ProtonDB for the compatibility and performance ratings of various Windows programs with Wine.