Sunday, October 2, 2022

How To Install WineHQ on Ubuntu 20.04

In this article, we want to teach you How To Install WineHQ on Ubuntu 20.04.

Wine (recursive backronym for Wine Is Not an Emulator) is a free and open-source compatibility layer that aims to allow application software and computer games developed for Microsoft Windows to run on Unix-like operating systems.

If there’s a Windows game or other app you just can’t do without, you can use Wine to run it right on your Ubuntu desktop. Wine is a work in progress, so it won’t run every application perfectly — in fact, some applications may not run at all — but it’s improving all the time.

How To Install WineHQ on Ubuntu 20.04

Before you start to install WineHQ, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article the Initial Server Setup with Ubuntu 20.04.

Now you can follow the steps below to set up WineHQ on Ubuntu 20.04.

Install Wine on Ubuntu 20.04

First of all, you need to check the installed architectures. To do this, run the command below:

sudo dpkg --print-architecture

You should get the following output:

Output
amd64

Then, check if 32-bit architecture is installed on your server with the command below:

sudo dpkg --print-foreign-architectures

You should get the following output:

Output
i386

Note: If “i386” is not displayed, execute the following command:

sudo dpkg --add-architecture i386

Next, recheck again with the command below:

sudo dpkg --print-foreign-architectures

To install the WineHQ in the latest stable version, you need to add the WineHQ repository to your server.

First, download and add the repository key with the commands below:

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

Then, add the WineHQ repository on Ubuntu 20.04 with the following command:

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

Update your local package index with the command below:

sudo apt update

Now use the following command to install the WineHQ stable:

sudo apt install --install-recommends winehq-stable

Note: If you prefer Wine Development or Wine Staging, replace winehq-stable with either winehq-devel or with winehq-staging.

When your installation is completed, you can verify your WineHQ installation on Ubuntu 20.04 by checking its version:

wine --version
Output
wine-7.0

Uninstall Wine from Ubuntu 20.04

If you don’t use Wine anymore you can easily remove it from your server. To do this run the following command:

sudo apt autoremove --install-recommends winehq-stable --purge

Note: If you use Wine Development or Wine Staging, replace winehq-stable with either winehq-devel or with winehq-staging.

Conclusion

At this point, you learn to Install WineHQ on Ubuntu 20.04.

Hope you enjoy it.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles