WineHQ is a compatibility layer that runs Windows applications on other operating systems, i.e., Linux, BSD, and macOS. Wine does not emulate the logic of windows; instead, it translates API to POSIX operating systems. It terminates all the memory and performance restrictions of the Windows applications and integrates them in the operating systems. I will show you how to install and configure wineHQ in Ubuntu 20.04 with two easy methods.

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Installing Wine from the Ubuntu software repository:

There are two methods available, installing from the Ubuntu repository lets you install a fully stable version of Wine. The 2nd method lets you decide whichever version you want to install on your operating system. There are currently three versions of Wine, i.e., WineHQ stable version, WineHQ staging version, and WineHQ Development version.

Method 1:

The Wine tool is available in the Ubuntu 20.04 repository, and the recommended method to install a stable version is through the Ubuntu repository.

Step 1:

As always, first, update and upgrade your APT.

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 2:

You have to enable “multiarch” in the terminal to define your system architecture. Also, update your APT again.

sudo dpkg –add-architecture i386

sudo apt update

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 3:

Now write the following command in your terminal window to install Wine recommended version.

sudo apt install wine64 wine32

This stable version includes all the necessary libraries needed for the WineHQ stable utility.

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 4:


When the installation completes, you will be able to check the installed version via the following command.

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Method 2:

To install Wine via Wine build repository, you have to remove all other wine packages such as the wine-mono or the winetricks; otherwise, it will cause dependency conflicts.

Step 1:

As Wine needs 32-bit architecture for installation, so change it by the following command

$ sudo dpkg –add-architecture i386

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 2:

Now download the repository key and add it to the APT through the following command

$ wget -O – https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 3:

Now add the repository via focal main, which is the main repository for ubuntu software.

$ sudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ focal main’

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 4:

Update your APT to save the necessary changes.

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 5:

Now here comes the main part which lets you decide which package you want to install.

For Stable package:

$ sudo apt install –install-recommends winehq-stable

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

For Development Package:

$ sudo apt –install-recommends winehq-devel

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

For Staging Package:

$ sudo apt install –install-recommends winehq-staging

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Step 6:

For Ubuntu WineHQ packages, you have to reconfigure the settings to enable some features which get disabled by default due to potential security risk.

$ dpkg-reconfigure wine-<packagename>-amd64 wine-<packagename>


wine-<packagename>-i386

The text inside these two tags “” should be replaced with your install wine package.

Conclusion:

I have shown you how to install all the different versions of the WineHQ utility tool in Ubuntu 20.04. Wine is one of the handiest tools, it runs most of the windows executable programs on Linux.

About the author

How to install and configure Wine on ubuntu 20.04 Windows Compatibility

Younis Said

I am a freelancing software project developer, a software engineering graduate and a content writer. I love working with Linux and open-source software.