Skip to content

Installing the WineHQ

This describes installing the WineHQ package from a separate remote repository.

Install The WineHQ Key to the Repo

Method 1

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

Method 2

wget -q https://dl.winehq.org/wine-builds/winehq.key -O - | gpg --dearmor --output /etc/apt/trusted.gpg.d/winehq.gpg

Install the Repository

Method 1

wget -nc -P /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources"

Method 2

apt-add-repository --uri "https://dl.winehq.org/wine-builds/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/" --component main

In case of Neon:

apt-add-repository --uri "https://dl.winehq.org/wine-builds/ubuntu/$(lsb_release -cs)" --component main

To remove te repository add the --remove option at the end of the same command-line when adding.

Install the Package (Staging since Stable is gone?)

dpkg --add-architecture i386
apt install --install-recommends winehq-stable

Check the Wine Version

wine --version

Auto Execute Wine

To run Wine automatically when executing an exe-file from the command line or otherwise.

Install the wine-binfmt package which installs dependency package binfmt-support.

See also binfmts.

apt install wine-binfmt

To enable it since it is not enabled after installing.

update-binfmts --display wine