Step-by-Step Guide to Install WineHQ on Ubuntu
Enable 32-bit architecture (necessary for Wine to run 32-bit Windows applications):
sudo dpkg --add-architecture i386
Download and add the WineHQ repository key:
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Add the WineHQ repository:
- For Ubuntu 22.04 (or modify the version if you're using a different one):
Replacesudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
jammy
with your Ubuntu version codename (e.g.,focal
for Ubuntu 20.04,bionic
for 18.04, etc.). Update the package lists:sudo apt update
Install WineHQ Stable:
sudo apt install --install-recommends winehq-stable