How to Install Wine on Fedora Linux

Wine is a compatibility layer for running Windows applications on Linux and other Unix-like operating systems. It allows users to run many Windows programs on their Linux system without needing a virtual machine or dual booting. Wine translates Windows system calls into Linux system calls, allowing Windows applications to interact with the Linux system.

When incorporated into Fedora, Wine can bring several benefits to users. Firstly, it allows users to run Windows applications that may not have Linux equivalents, providing greater flexibility and choice in software selection. Secondly, it can also offer a way to run Windows-only software that may be required for specific work or personal tasks. Thirdly, it also allows users to run older Windows software that may not be compatible with newer versions of Windows.

Features of Wine for Linux:

  • Compatibility with a wide range of Windows applications and games
  • Support for running 32-bit and 64-bit Windows software
  • Support for running Windows software on multiple Linux distributions, including Fedora
  • Support for running Windows software in virtual desktop environments
  • Customization options for resolution, color depth, window size, and more
  • Support for running Windows software with custom DLL overrides
  • Support for running Windows software with a virtual drive, desktop, printer, clipboard, sound card, and joystick

Benefits of using Wine on Fedora Linux:

  • Allows users to run Windows applications that may not have Linux equivalents, providing greater flexibility and choice in software selection.
  • Provides a way to run Windows-only software that may be required for specific work or personal tasks.
  • Allows users to run older Windows software that may not be compatible with newer versions of Windows.
  • It can also run Windows software on a system with Windows installed, which can help run software that may not be compatible with the version of Windows installed on the system or for testing how a Windows application will run on different configurations.
  • Wine for Linux allows users to run windows applications on Linux without needing a virtual machine or dual booting.
  • Wine translates Windows system calls into Linux system calls, allowing Windows applications to interact with the Linux system.

This guide will explore two methods for installing Wine on Fedora Linux using the command-line terminal. The first method involves using Fedora’s default repository and the DNF package manager. In contrast, the second method uses the official WineHQ repository to install the latest stable, pre-release, or development version of Wine.

Step 1: Update Fedora

Before you begin, run a quick update to ensure your system is up-to-date to avoid any conflicts during the installation of Wine.

sudo dnf upgrade --refresh

Method 1: Install Wine from Fedora Repository

The following packages must be installed to assist in installing the software. Run the following command in your terminal.

sudo dnf install wine

It is essential to note that many games and Windows applications may be developed for 32-bit architecture systems. To ensure optimal performance and compatibility, enabling support for 32-bit architecture on your Fedora Linux system is recommended. This can be accomplished by executing the following command.

sudo dnf install wine.i686

This command will install the necessary packages for 32-bit architecture support on your system. This step is especially crucial for users who may be utilizing lower-end systems. Many games may be developed for the 32-bit format, and users may experience limitations without enabling this support.

Lastly, verify that the installation was successful. You can run the following command to check the version of Wine installed on your system.

wine --version

Example output:

wine-8.0 (Staging)

At this point, you have completed the installation of Wine on Fedora Linux using the default repository method. For users who desire to utilize the latest stable, pre-release, or development version from WineHQ, exploring the alternative process of installing Wine from the official WineHQ repository is recommended. This method provides access to the most recent versions of Wine and allows users to test the latest features and improvements.

Method 2: Install Wine from WineHQ

Enable the WineHQ repository

The first step is to enable the WineHQ repository on your Fedora system. This can be done by running the following command.

sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/<Fedora version>/winehq.repo

For example, if you are using Fedora 36 or 37, you would use the following commands.

Import WineHQ repository for Fedora 37:

sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/37/winehq.repo

Import WineHQ repository for Fedora 36:

sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/36/winehq.repo

Install Wine – WineHQ Stable Release

The initial approach to consider when installing Wine on Fedora Linux is to utilize the latest version from the stable branch. This installation method is often considered the optimal solution as it provides an updated version of Wine that is more current than the version available in the default repository while still being a stable release, as opposed to a development release from WineHQ. This ensures that users can access the latest features and improvements while minimizing the risk of encountering bugs or compatibility issues.

To install the stable release of Wine, execute the following command in the terminal:

sudo dnf install winehq-stable

To confirm the version of Wine that has been installed on your system, enter the following command in the terminal.

wine --version

Example output:

wine-8.0

Install Wine – WineHQ Staging Release

Another approach to consider when installing Wine on Fedora Linux is to utilize the latest version from the staging branch. The staging branch is regarded as the beta or testing version before it is officially released. This method is ideal for users who prefer to have the newest version of Wine available but do not wish to risk the instability that can come with using a development version of Wine. This method provides access to the latest features and improvements while minimizing the risk of encountering bugs or compatibility issues. It is recommended for users who want to test the features before they are officially released.

To install the staging release of Wine, execute the following command in the terminal:

sudo dnf install winehq-staging

To confirm the version of Wine that has been installed on your system, enter the following command in the terminal.

wine --version

Example output:

wine-8.0 (Staging)

Install Wine – WineHQ Development Release

Another option for installing Wine on Fedora Linux is utilizing the latest development branch version. The development branch is considered to be the bleeding-edge version of Wine, and as such, it may be unstable or cause instability in your system. This method is recommended for more experienced users or developers who are interested in testing the latest features and improvements and are comfortable with the risk of encountering bugs or compatibility issues. It is important to note that this method is not recommended for production use as it may contain features still in development and may not work as expected.

To install the development release of Wine on Fedora Linux, enter the following command in the terminal.

sudo dnf install winehq-devel

After completing the installation, verify the version of Wine that has been installed on your system with the following command.

wine --version

Example output:

wine-8.0

How to Finalize Wine Installation

After installing Wine on your Fedora Linux system, it is important to set up the necessary environments for it to function correctly. One way to do this is by running the “winecfg” command in the terminal.

This command will launch the Wine configuration utility, which allows you to configure various settings and options, such as the Windows version that Wine should emulate, and the location of your Windows drive. Additionally, the “winecfg” command also installs the required libraries and dependencies for Wine to operate smoothly.

It is recommended to run the “winecfg” command after every Wine upgrade or installing a new Windows application, ensuring the application will run correctly and smoothly.

Note that this command should be run as a regular user and not as root to avoid potential issues. To run the command, open a terminal, type “winecfg,” and press enter.

winecfg

Example output:

In order to proceed with the installation process, selecting the “Install” option is necessary. This action will initiate the installation of Mono, a software development framework for Windows applications, as well as its necessary dependencies.

Mono is an open-source implementation of Microsoft’s .NET Framework and is required for certain Windows applications to run correctly on Wine. By selecting “Install,” the system will automatically download and install the necessary components to enable Wine to function as intended.

It is important to note that the installation process may take some time, as the system will be downloading and installing various packages and dependencies. Once the installation is complete, you can run Windows applications on your Fedora Linux system using Wine.

Configure Wine GUI

Additionally, the Wine Configuration window also allows changing audio, libraries, drivers, and graphics settings. The audio settings allow for the configuration of sound output and input, while the libraries settings enable the user to specify the version of certain Windows libraries to be used by Wine. The driver settings provide the option to configure the graphics driver to be used by Wine. The graphics settings allow for the customization of display settings, such as the virtual desktop resolution.

By utilizing these options, users can fine-tune their Wine installation to better suit their specific needs and ensure optimal performance.

Example:

Install NotePad++ Windows Application (Example)

An example of using Wine would be to download and install a Windows application, such as Notepad++. To do this, the Notepad++ installation .exe file would be downloaded and opened using Wine. This process can be done by right-clicking on the .exe file, selecting “Open With Wine Windows Program Loader,” and selecting the Wine application to run the file. This process can be applied to any Windows binary file compatible with your system configuration.

Example:

Now install NotePad++ using the same process as any other Windows application.

Examples:

Additional Commands & Tips

How to configure Wine as 32-bit

The ability to configure Wine for both “32-bit” and “64-bit” Windows applications is possible on Fedora Linux. The previous examples demonstrated the use of the default “64-bit” configuration. However, if you wish to launch the Wine environment as a “32-bit” system, you can use the following commands to make the necessary adjustments.

export WINEARCH=win32
export WINEPREFIX=~/.wine32
winecfg

How to Update Wine

To update Wine on Fedora Linux, you can use the package manager to check for the latest version and install it. The best way to do this is by running the following command in the terminal.

sudo dnf upgrade refresh.

How to Remove (Uninstall) Wine

Depending on your needs, you may need to remove a particular version of Wine to install another or remove it in full. Use one of the corresponding commands to match your version.

If you installed Wine from the WineHQ repository, use the following command that matches your installation.

sudo dnf autoremove winehq-stable
sudo dnf autoremove winehq-staging
sudo dnf autoremove winehq-devel

For complete removal, delete the repository file.

sudo rm /etc/yum.repos.d/winehq.repo

The users that installed Wine from the default Fedora repository use the following command.

sudo dnf autoremove wine
sudo dnf autoremove wine.i686

Conclusion

In summary, WineHQ is a valuable tool for Linux sysadmins, gamers, and desktop users as it allows them to run Windows applications on their Linux operating system, such as Fedora Linux. This compatibility layer, Wine, translates Windows system calls into POSIX-compliant system calls, enabling Windows applications to operate seamlessly on Linux and other Unix-like systems. The advantages of using Wine on Linux include accessing Windows-based programs unavailable on Linux, increased productivity, and a more comprehensive range of software options. As a result, WineHQ is a crucial tool for anyone looking to enhance their Linux gaming experience or use specific Windows-based software on their computer running Fedora Linux or other Linux distributions.

Share to...