Red Wine in a GlassHow to Install Wine on deepin 20CSS HTML Validator Logo
HOME Tutorials & Essays About
Tutorials & Essays About

May 26, 2023

deepin 20 screen shot

How to Install Wine on Deepin 20

Tested on Deepin 20.9.

An image reading copy paste into terminal

These instructions install Wine Stable 7.0 and Wine Development 7.17, not the current versions of Wine, which are 8.0 and 8.9. This is because Deepin 20.9 is based on Debian 10 Buster, which is currently Oldstable and not receiving updates other than for security.

Check installed architectures

Verify 64-bit architecture. The following command should respond with "amd64".

$ dpkg --print-architecture

See if 32-bit architecture is already installed. The following command should respond with "i386"

$ dpkg --print-foreign-architectures

If it does not display "i386", execute the following.

$ sudo dpkg --add-architecture i386

Re-check 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

Add the Wine repository

$ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/oldstable/winehq-buster.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

The default Wine configuration prepares Wine as a Windows 7 environment, which is good for some older Windows apps, but many contemporary apps will be better matched to Windows 8.1 or Windows 10. In addition, other configuration options may be significant.

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.

$ 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.

$ 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 installing a Windows app with Wine, consider Abcdef, a fictitious Windows application which is installed by Abcdef_Setup.exe. To install your own Windows app, replace Abcdef_Setup.exe with the filename of your app's installer.

The first step is to download Abcdef_Setup.exe and store it in ~/Downloads.

After doing that, execute winecfg (if you haven't already).

$ wine winecfg

The command to execute Abcdef_Setup.exe must be issued from the directory where Abcdef_Setup.exe is located, so execute

$ cd ~/Downloads

The next command starts the installation. Respond to the installer's prompts just as you would in Windows.

$ wine Abcdef_Setup.exe

Here is a real example. It installs version 8.6 of the text editor Notepad++. The file name of the Notepad++ installation program is npp.8.6.Installer.x64.exe

$ wine npp.8.6.Installer.x64.exe

When installation is complete, look for an Abcdef 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


Did you find this page helpful? Have constructive feedback? Wisdom to share?

Send email to Email Address

Privacy PolicyNew Window Icon

Image showing Athena serving Wine to Heracles