The procedure on this page installs the latest version of Wine Stable, Wine Development, or Wine Staging.
Check installed architectures
Verify 64-bit architecture. The following command should respond with "amd64".
$ dpkg --print-architecture
See if 32-bit architecture is installed. The following command should respond with "i386".
$ dpkg --print-foreign-architectures
If "i386" is not displayed, execute the following.
$ sudo dpkg --add-architecture i386
Recheck with.
$ dpkg --print-foreign-architectures
Download and add the WineHQ repository key
$ sudo mkdir -pm755 /etc/apt/keyrings
$ sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Download the WineHQ sources file
$ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources
Update the package database
$ sudo apt update
Install Wine
The next command installs Wine Stable. To install Wine Development or Wine Staging, replace winehq-stable by winehq-devel or winehq-staging
After a major Wine upgrade (from Wine 6 to Wine 7, for example), Wine Stable may temporarily be unavailable, but Wine Development and Wine Staging can still be installed.
$ sudo apt install --install-recommends winehq-stable
Verify the installation succeeded
$ wine --version
Configure Wine
To bring up Wine's configuration panel, open a Terminal window and execute winecfg. If installing mono or gecko is offered, accept the offer.
When prompted, set your preferred version of Windows. Windows 10 may be preferred for most applications.
$ wine winecfg
If you are creating custom Wine prefixes, this configuration must be repeated for each prefix.
Two simple tests
Just for fun, or to see Wine in action …
Display a simple clock
$ wine clock
Run Wine's builtin web browser
If installing gecko is offered, accept the offer.
Lately, iexplore fails to run properly on some distributions. If the window that opens is solid black, click the Refresh button to obtain partial functionality. Scrolling does not work, but links and window resizing do.
$ wine iexplore
How to install a Windows app
Wine is a Terminal application. Even after installing Wine, you will not find it listed with the desktop apps that came with your Linux distribution. Wine is invoked using Terminal commands.
As an example of using Wine, here is how to install WinPgm, a fictitious windows application. You can use the same procedure to install your own Windows apps by replacing the installer for WinPgm with your app's installer.
The first step is to download the WinPgm installer and store it in ~/Downloads.
After doing that, execute winecfg (if you haven't already).
$ wine winecfg
The command to install WinPgm must be issued from within the same directory as the installer, so execute
$ cd ~/Downloads
The next command starts the installation. Respond to the installer's prompts just as you would in Windows.
$ wine WinPgm-installer.exe
When installation is complete, look for a WinPgm launcher on your desktop. There may also be an entry named Wine in your distribution's Applications. Launchers may require you to confirm execution of your app is safe.
More about installing Windows apps
- The installer does not need to be in ~/Downloads. Any directory is fine, as long as you issue the wine command from that directory.
- If the installer is a Windows .msi file instead of an .exe, use the wine msiexec /i command instead of wine.
- Not all Windows apps can run under Wine. Consulting the Wine Application Database may be helpful.