Install Wine and PlayOnLinux Ubuntu 21.10

Install Wine on Ubuntu 21.10

Refer: https://wine.htmlvalidator.com/install-wine-on-ubuntu-21.10.html

Check installed architectures

Verify 64-bit architecture. The following command should respond with "amd64".

$ dpkg --print-architecture

See if 32-bit architecture is installed. The following command should respond with "i386".

$ dpkg --print-foreign-architectures

If "i386" is not displayed, execute the following.

$ sudo dpkg --add-architecture i386

Recheck with.

$ dpkg --print-foreign-architectures

Add the WineHQ Ubuntu repository.

Get and install the repository key.

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key

$ sudo -H gpg -o /etc/apt/trusted.gpg.d/winehq.key.gpg --dearmor winehq.key

Add the repository.

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'

Update the package database.

$ sudo apt update

Install Wine

The next command will install Wine Stable. If you prefer Wine Development or Wine Staging, replace winehq-stable with either winehq-devel or with winehq-staging.

$ sudo apt install --install-recommends winehq-stable

Verify the installation succeeded
$ wine --version

Configure Wine

The default Wine configuration prepares Wine as a Windows 7 environment, which is good for some older Windows apps, but many contemporary apps will be better matched to Windows 8.1 or Windows 10. In addition, other configuration options may be significant.

To bring up Wine's configuration panel, open a Terminal window and execute winecfg. When prompted, set your preferred version of Windows and accept all offers to install Mono and Gecko.

Depending on the version of Wine, Gecko may need to be installed twice (for 32-bit and for 64-bit) or not at all. (Wine 6.0.2 will install Gecko twice. Wine 6.17 and later will not ask to install Gecko, but a Windows app that needs Gecko will, during installation, prompt to be allowed to install it.)

$ wine winecfg

If you are creating custom Wine prefixes, this configuration must be repeated for each prefix.
Two simple tests

Just for fun, or to see Wine in action …

Display a simple clock.

$ wine clock

Run Wine's builtin web browser.

$ wine iexplore

Install PlayOnLinx

Refer: https://installati.one/ubuntu/21.10/playonlinux/

Install playonlinux Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install playonlinux using apt-get by running the following command:

sudo apt-get -y install playonlinux

Wine HQ Needs Key Updated

Refer: https://www.reddit.com/r/wine_gaming/comments/a7pno3/winestaging_repo_missing_public_key/ec59pqb/

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key; sudo apt-key add winehq.key