How To Install WineHQ On Ubuntu 20.04?

Some applications are only available for Windows, but we’d like to run them on a Linux system as well. As a result, Linux developed a compatibility layer named “WineHQ” (not an emulator) that allows you to run windows-only applications on UNIX operating systems like Linux, macOS, and FreeBSD. Every window application will not run on Linux, but if they do, they will behave differently than they will on Windows. It also includes “Winelib”, a software library that allows developers to compile Windows applications on other operating systems. “WineHQ” converts window system calls into the corresponding POSIX calls by using a UNIX-like operating system.

WineHQ” is a very versatile Linux application, and there are two simple ways to install it:

  1. Installing wineHQ via Ubuntu software repository
  2. Installing wineHQ via wine build repository

Installing “wineHQ” Via Ubuntu Software Repository

Ubuntu software repository is the most preferred method to install the stable version of “wineHQ”. It is available in 32bit and 64bit architecture.

Use the given command to determine which architecture is present in your system:

$ lscpu

It shows that X86_64 architecture is in your system.

Before installing the new package, it is strongly advised to update your package list:

$ sudo apt update

When updating process gets completed, you need to upgrade your packages list:

$ sudo apt upgrade

To install both 32bit and 64bit packages on your system, you need to enable the “multiarch”. Also, update the packages:

$ sudo dpkg --add-architecture i386

$ sudo apt update

When the “multiarch” has been enabled, you can install the recommended version of “wineHQ” by using the command:

$ sudo apt install wine64 wine 32

To continue with the installation, press “Y”.

WineHQ” has been installed. To determine the version of “WineHQ” that is currently installed, use:

$ wine --version

Installing “wineHQ” Via Wine Build Repository

The second method to install “wineHQ” is through the wine build repository. However, before doing so, you must uninstall all wine packages, including wine-mono, if they are already installed.

There are no “wineHQ” packages available in my system.

To install “wineHQ” on both 32bit and 64bit architecture, you must enable “multiarch” with the command:

$ sudo dpkg --add-architecture i38

Adding Repository Key

To download the “wineHQ” repository key and import it to the system, execute the given command:

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

Now, enable the repository on your system:

$ sudo apt-add-repository ‘deb <a href="https://dl.winehq.org/wine-builds/ubuntu/">https://dl.winehq.org/wine-builds/ubuntu/</a> bionic main’

Again, use the command below in updating packages:

$ sudo apt update

Let’s install “wineHQ” on your system, we have three versions of wineHQ:

For Stable wineHQ

To install the most stable and recent version of “wineHQ”, use:

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

If you want to continue the installation process, hit “Y”, otherwise “N”.

For Developing wineHQ

This version of “wineHQ” is preferred by the majority of developers, but it may not be as stable. Execute the command to install it:

$ sudo apt install --install-recommends winehq-devel

When you press “Y”, the installation process will proceed.

For Staging wineHQ

Use the command to install the staging version of “wineHQ”:

$ sudo apt install --install-recommends winehq-staging

Once the installation is completed, ensure the installation by checking the version of “wineHQ”:

$ wine --version

The most recent version of “wineHQ” has been installed successfully.

Configuring Wine:

To configure the “wine”, type “winecfg” in your terminal:

$ winecfg

Mono packages will be installed as well with this command. A dialog box will appear on the screen, asking whether you want to install the “Wine Mono packages” or not; click “install”.

To configure the wine environment, a wineHQ configuration dialogue box will appear. If you want to change the window edition, choose “window version” from the drop-down menu.

Now, you can install any Windows application on Linux.

Installing Notepad on Linux Using Wine

Let’s install “Notepad ++” which is a Windows exclusive application on Linux.

First, you need to download the “.exe” file of “Notepad ++” from the GitHub repository, copy the mentioned command and paste it in terminal:

$ wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v7.8.8/npp.7.8.8.Installer.exe

Now that the”.exe” file has been downloaded, use “wine” to install it:

$ wine npp.7.8.8.Installer.exe

After selecting a language and clicking “OK“, the “Notepad ++” installer will appear. To continue, click “Next”.

Choose the location where you want to save this file; click “Next” to continue.

Click “Install”.

Once the installation is completed, Hit “Finish”.

Launching “Notepad++”

To launch the “Notepad++”, type “notepad++” in the applications search bar.

Alternatively, you can open “notepad++” by using the command line.

$ wine notepad++

A preloaded file will open.

Notepad has successfully been installed on the Linux system.

Removing “wineHQ” from Your System

Using the “purge” command, you can remove the “wineHQ” application and all of its packages from your system:

$sudo apt purge winehq-stable

WineHQ” has been removed from your system.


WineHQ” is a compatibility layer that assists you to run window-only applications on UNIX-like operating systems as well. We’ve shown you how to install “wineHQ” from the Ubuntu software repository and the “WineHQ” build repository in this post. We have focused on how to delete it from your system when you no longer need it. In addition, we have installed “Notepad ++” in Linux, which is a simple text editor and runs on a Windows operating system.

About the author

Aqsa Maqbool

As a Software engineer, I am passionate to write about various IT related
articles but have deep interest in Linux. I spend most of my time reading Linux related blogs and IT related books. I want to serve the world with my writing skills.