Share your love
How To Install WineHQ on Ubuntu 20.04
In this article, we want to teach you How To Install WineHQ on Ubuntu 20.04. WineHQ is a popular, free, and open-source tool that allows you to run Windows software and applications on your Linux server.
Now follow the steps below to install this amazing tool on your Ubuntu 20.04.
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 start to set up WineHQ on Ubuntu 20.04.
Step 1 – Check Installed Architectures 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, run the following command:
sudo dpkg --add-architecture i386
Next, recheck again with the command below:
sudo dpkg --print-foreign-architectures
Step 2 – Add WineHQ GPG Key and Repository on Ubuntu 20.04
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:
# sudo 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
Install Wine Stable on Ubuntu 20.04
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
Step 3 – How To 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 have learned to Install WineHQ on Ubuntu 20.04. You can use this tool to use Windows programs and software on your Linux server.
Hope you enjoy it. You may be interested in these articles too:
How To Install WineHQ on AlmaLinux 9