How to install Wine on Linux

Last updated on June 7, 2020 by Dan Nanni

Question: I need to run a Windows application on Linux, and for that, I would like to try Wine. How can I install Wine on [insert your Linux distro]?

Wine is a popular user-space software program which allows one to run Windows applications on Linux. Wine provides a run-time environment for a Windows application by serving Windows APIs called by the application. As of today, there are more than 27,000 Windows applications that are supported by Wine.

Install Wine on Ubuntu or Debian

Since Wine is included in the default repository of Debian-based distributions, you can install it with apt-get. However, if you are using a 64-bit system, you need to enable multi-architecture as Wine is a 32-bit application.

On 64-bit System:

$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install wine wine32 wine64 libwine libwine:i386 fonts-wine

On 32-bit System:

$ sudo apt-get install wine wine32 libwine fonts-wine

Install Wine on Ubuntu via PPA Repository

On Ubuntu-derivatives (Kubuntu or Lubuntu) or Linux Mint, you can also install Wine by using the Wine PPA maintained by WineHQ team, as shown below. This version is more recent than the one included in the default repository.

$ wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
$ sudo apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/'
$ sudo apt update
$ sudo apt install wine

Install Wine on Fedora

Installation of Wine is straightforward on Fedora. Simply use yum command.

$ sudo yum install wine

Install Wine on CentOS

To install Wine on CentOS, you first need to set up EPEL repository. Then use yum command to install it.

$ sudo yum install wine

Install Wine on openSUSE

Wine is available in the default repository of openSUSE, so installation is hassle free with zypper command.

$ sudo zypper install wine

Wine Post-installation

Below is the screenshot of the Wine configuration editor (winecfg) which allows you to set application-specific Wine settings.

One useful application to install along with Wine is PlayOnLinux. This program allows you to quickly configure Wine for a pool of well-known Windows applications and games. Thus it is recommended to install PlayOnLinux if you are using Wine.

Troubleshooting

1. I cannot add a Ubuntu PPA repository due to GPG error.

Symptom: apt-add-repository results in the following errors even though I have imported the GPG key of the PPA repository.

Err:4 https://dl.winehq.org/wine-builds/ubuntu XXXXX InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
Reading package lists... Done
W: GPG error: https://dl.winehq.org/wine-builds/ubuntu XXXXX InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu XXXXX InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

The reason for the errors is probably because you imported a wrong GPG key (Release.key). You have to use a new key (winehq.key) as shown below.

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

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean