Menu
User

DropVPS Team

Writer: Cooper Reagan

how to install wine on RHEL

how to install wine on RHEL

Publication Date

10/27/2025

Category

Articles

Reading Time

3 Min

Table of Contents

Running Windows software on Red Hat Enterprise Linux is straightforward with Wine. The process needs RHEL 9/8 repositories, EPEL, and multilib (i686) libraries for 32‑bit apps. Commands below are safe to copy‑paste. Expect to initialize a Wine prefix, install fonts, and test with a sample Windows program.

Check RHEL version and CPU architecture

Wine on RHEL targets x86_64. Confirm the OS release and hardware before proceeding.

. /etc/os-release
echo "RHEL $VERSION_ID on $(uname -m)"
Example output:
RHEL 9.3 on x86_64

Update system and install base tools

Refresh metadata and install utilities used for repositories and downloads.

sudo dnf -y update
sudo dnf -y install dnf-plugins-core curl tar

Verify subscription and enable CodeReady Builder

CodeReady Builder provides developer libraries required by Wine. Make sure the system is registered and enable the correct repository.

sudo subscription-manager status
# Enable CRB for your major version (run one of the following):
# RHEL 9:
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(uname -m)-rpms
# RHEL 8:
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(uname -m)-rpms

Enable EPEL repository

EPEL hosts the Wine build for RHEL. Install the matching EPEL release package.

# RHEL 9:
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# RHEL 8:
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf makecache

Add 32-bit (i686) multilib support

Most Windows apps are 32‑bit. Ensure i686 libraries are available by installing a few core multilib packages.

sudo dnf -y install glibc.i686 libX11.i686 mesa-libGLU.i686
# Verify i686 availability
dnf list glibc.i686 | sed -n '1,3p'

Install Wine and Winetricks

Install 64‑bit Wine, 32‑bit Wine for legacy apps, and Winetricks for common runtime components.

sudo dnf -y install wine winetricks
sudo dnf -y install wine.i686
wine --version
# Example: wine-9.0 (Staging) or similar

Initialize Wine prefix

Create a default 64‑bit prefix and, if needed, a separate 32‑bit prefix for older apps.

# Default 64-bit prefix at ~/.wine
winecfg

# Optional: dedicated 32-bit prefix at ~/.wine32
WINEARCH=win32 WINEPREFIX=$HOME/.wine32 winecfg
First-run will download and install Wine Mono and Gecko when prompted.

Install core fonts and runtimes

Many applications expect Microsoft core fonts and common Visual C++ runtimes. Use Winetricks to add them silently.

# For default prefix
winetricks -q corefonts

# For 32-bit prefix example
WINEPREFIX=$HOME/.wine32 winetricks -q corefonts vcrun2015

Run a Windows program

Test Wine with Notepad or install a real application, such as 7‑Zip, into the desired prefix.

# Quick test
wine notepad

# Download and run an installer (64-bit example)
mkdir -p ~/winapps
curl -L -o ~/winapps/7zip.exe https://www.7-zip.org/a/7z2301-x64.exe
wine ~/winapps/7zip.exe

# Install into 32-bit prefix
WINEPREFIX=$HOME/.wine32 wine ~/winapps/7zip.exe

Troubleshoot common issues

Resolve typical repository and dependency errors seen on fresh RHEL nodes.

# If CRB wasn’t enabled successfully, re-check and re-run:
sudo subscription-manager repos --list-enabled | grep -i codeready

# If dependencies fail, rebuild cache and retry:
sudo dnf clean all
sudo dnf makecache
sudo dnf -y install wine wine.i686
# If GUI apps don’t open over SSH, enable X11 forwarding:
# On client: ssh -Y user@server
# On server, ensure xauth exists:
sudo dnf -y install xorg-x11-xauth

Reset or remove Wine (optional)

Remove packages or wipe a prefix to start clean.

# Uninstall Wine and Winetricks
sudo dnf -y remove wine\* winetricks

# Remove Wine prefixes (user data)
rm -rf ~/.wine ~/.wine32

Installation is complete. Wine now runs Windows apps on your RHEL 9/8 host with multilib and EPEL enabled. For more tutorials, guidance, and to buy reliable servers with support, visit dropvps.com

For more guides, visit dropvps.com

Windows VPS
U
Loading...

Related Posts