Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Wine on Ubuntu 22.04

Add the official WineHQ repository, install the stable version and remove it when you no longer need it.

VPS and Cloud Servers1 min read14 screenshots

What is Wine

Wine lets you run many Windows programs on Linux without a Windows license.

Step 1: Update the system

sudo apt update
Updating the package list

Step 2: Upgrade the packages

sudo apt upgrade -y
Upgrading the packages
Upgrade finished

Step 3: Enable 32-bit architecture

sudo dpkg --add-architecture i386
Adding the 32-bit architecture

Step 4: Create the keyring folder

sudo mkdir -pm755 /etc/apt/keyrings
Creating the keyrings folder

Step 5: Download the WineHQ key

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Downloading the WineHQ key

Step 6: Add the source file

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
Adding the WineHQ source file

Step 7: Refresh the package list

sudo apt update
Refreshing the package list

Step 8: Install Wine stable

sudo apt install --install-recommends winehq-stable -y
Installing Wine
Wine installed

Step 9: Check it

wine --version
The Wine version

Remove Wine

sudo apt purge winehq-stable -y
sudo apt autoremove -y
Purging Wine
Removing the unused packages

Check again:

wine --version
Wine is no longer found

Quick recap

  • Add the 32-bit architecture and the WineHQ repository.
  • Install winehq-stable and check with wine --version.