How to Install Wine on Linux Mint 21 or 20

Wine is a compatibility layer for running Windows applications on Linux and other Unix-like operating systems. It allows users to run many Windows-based programs on Linux without needing to install a Windows operating system. Wine translates Windows system calls into POSIX-compliant system calls, allowing Windows applications to run on Linux and other Unix-like operating systems.

In the following tutorial, you will learn how to install and configure Wine on Linux Mint 21 or Linux Mint 20 release series using the command line terminal by importing the official WineHQ repository and installing the latest stable, which is still at this current time, 7.0 or the staging or development releases which are currently featuring 8.0 onwards.

Please note, as of the 14th of January 2023, when this tutorial was last updated, you cannot install the WineHQ version on Linux Mint 21.0 Vannessa; you need to be on Linux Mint 21.1 Vera. Linux Mint 20.xx users should also be on Linux Mint 20.3 Una, or the same issue will likely occur.

Update Linux Mint – Upgrade System Packages

Before you begin, run a quick update to ensure your system is up-to-date to avoid any conflicts during the installation of Wine.

sudo apt update

Optionally, you can list the updates for users who require review or are curious.

apt list --upgradable

Proceed to upgrade any outdated packages using the following command.

sudo apt upgrade

Install Required Packages

The following packages must be installed to assist in installing the software. Run the following command in your terminal.

sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https curl -y

Enable 32-bit Support

Ideally, you should enable 32-bit architecture support, as many games and especially Windows applications may come in this form. Without it, you may be limited in what you can use with Wine.

sudo dpkg --add-architecture i386

Most users should enable this for lower-end systems that can only play lower-end games that come in a 32-bit format more often than not, and high-powered systems will not notice any impact having the packages installed.

See also
How to Install Linux Kernel 6.1 on Ubuntu 22.04 or 20.04

Import WineHQ Repository

Before installing any versions of Wine from WineHQ, import the GPG key and the WineHQ from the Focal Fossa repository branch using the following steps.

First, import the GPG key required to verify the authenticity of the Wine packages from WineHQ.

curl -s https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/winehq.gpg > /dev/null

Using the following command, import the WineHQ repository. Remember to import the correct version for your distribution.

Import WineHQ repository for Linux Mint 21.xx

echo deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ jammy main | sudo tee /etc/apt/sources.list.d/winehq.list

Import WineHQ repository for Linux Mint 20.xx

echo deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ focal main | sudo tee /etc/apt/sources.list.d/winehq.list

Now, run an APT update to reflect the new packages that have been imported.

sudo apt update

Install Wine – WineHQ Stable Release

The first method is to install the latest Wine version from the stable branch. This is often the best solution as it is more updated than the default repository version while not bleeding-edge, such as the development release from WineHQ.

Run the following command to install the stable Wine release.

sudo apt install winehq-stable --install-recommends  -y

Once completed, verify the version you have installed by typing the following command:

wine --version

Example output:

wine-7.0.1

Alternative – Install Wine from the Default Repository

For users who prefer an older version, you can install this alternative version in case the stable fails, and you do not want to install the staging or developer version. This comes from Ubuntu‘s default repository; while it’s stable, it is an older version.

Install Wine with the default repository 64-bit version only.

sudo apt install wine64 -y

For users that have enabled 32-bit Support, install both architectures as follows.

sudo apt install wine64 wine32 -y

Install Wine – WineHQ Staging Release

The second method is to install the latest Wine version from the staging branch. This ideally is the beta version or testing version just before release. I recommend the staging branch for users who prefer a newer version rather than a stable without risking the instability risks of bleeding-edge, such as the development version.

Run the following command to install the Wine staging release.

sudo apt install --install-recommends winehq-staging -y

Once completed, verify the version you have installed by typing the following command to give you an output.

wine --version

Example output:

wine-8.0-rc3 (Staging)

Install Wine – WineHQ Development Release

The third method is to install the latest Wine version from the development branch. This is bleeding-edge software and can sometimes be unstable or cause your system instability. This is recommended for more experienced users or developers that want a taste of what is to come.

See also
How to Install Glances on Debian 11 or 10

Run the following command to install the Wine development release.

sudo apt install --install-recommends winehq-devel -y

Once completed, verify the version you have installed by typing the following command to give you an output.

wine --version

Example output:

wine-8.0-rc3

Sometimes, both the dev and staging repositories contain the same version.

How to Finalize Wine Installation

Once WineHQ is installed, run the command winecfg” from your terminal, which will install the required environments for Wine to operate.

winecfg

Example output:

Press Install to proceed to install Mono and its dependencies.

Configure Wine Window

Once you have finished the installation, the Wine configuration dialogue will be shown. In this section of the software, you can configure various Wine settings.

The default settings should be sufficient in most cases. However, if you change anything, the Windows version will default from Windows 7 to something more recent, such as Windows 10. This depends on what you are using Wine for.

Do not forget to scroll through audio, graphics, and the other tabs to customize Wine further. Once finished, close the dialogue box.

The example will download Notepad++ and open the installation .exe using Wine.

Now, downloading any .exe Windows binary file that suits your configuration, you can run it by right-clicking, selecting “Open With Other Application,” and selecting Wine to run.

Example:

Proceed to install, then run your Windows application, the final look of installing Notepad++ on Linux Mint.

Examples:

Additional Commands & Tips

How to configure Wine as 32-bit

On Linux Mint, you can configure Wine for the 32-bit and 64-bit Windows applications. The examples above focused on using the “64-bit” set by default. But if you wish to launch the Wine environment as a “32-bit” system, use the following commands.

export WINEARCH=win32
export WINEPREFIX=~/.wine32
winecfg

How to Run Wine From Terminal

While you can right-click applications downloaded and select open with Wine, as most users know, you can use the following command for strictly terminal terms.

wine PROGRAM [ARGUMENTS...]   Run the specified program

Example:

wine <application name>.exe

How to Update Wine

For future updates from WineHQ, this can be done using the APT update and APT upgrade commands.

sudo apt upgrade && sudo apt update

How to Remove (Uninstall) Wine

Depending on your needs, you may need to remove a particular version of Wine to install another or remove it in full. Use one of the corresponding commands to match your version.

See also
How to Install Waterfox Browser on Linux Mint 21 or 20

Remove WineHQ Stable Release

sudo apt autoremove winehq-stable -y

Remove WineHQ Staging Release

sudo apt autoremove winehq-staging -y

Remove WineHQ Development Release

sudo apt autoremove winehq-devel -y

For complete removal, delete the repository file.

sudo rm /etc/apt/sources.list.d/winehq*

If you have removed the WineHQ repository, it is recommended to remove the GPG key.

sudo rm /usr/share/keyrings/winehq*

Remove Wine (Default version)

The users that installed Wine from the default repository use the following command.

sudo apt autoremove wine32 wine64 -y

Conclusion

In conclusion, installing Wine on Linux systems allows users to run many Windows-based applications without the need to install a Windows operating system. This compatibility layer translates Windows system calls into POSIX-compliant system calls, making it possible for Windows applications to run on Linux and other Unix-like operating systems. The benefits of using Wine on Linux include using Windows-based programs unavailable for Linux, increased productivity, and access to a broader range of software options.

10 thoughts on “How to Install Wine on Linux Mint 21 or 20”

  1. Thanks very much – was able to follow this on Linux Mint 21 and get one of may favorite older Windows programs working

    Reply
    • Hi Tom,

      I recently redid POP!_OS with Wine, so to answer your question it should work hopefully. I cannot say anything about MX Linux I have actually never installed Wine on it ever, though it should be straightforward you would think, then again Linux Distros can throw a few curveballs every now and then.

      Thanks for the message.

      Reply
    • Hi Tom, thanks for the message.

      I am in the process of tidying up this tutorial, but I just was able to install Wine stable, staging and devel. Are you using LMDE 5 or Linux Mint 21.1? Since Mint 21.1 is based on Ubuntu and LMDE is based on Debian, you will need to change the repositories.

      Thanks Tom,

      Please note, anyone else reading these messages, you need to be on Linux Mint 21.1, you cannot install WineHQ version of Wine on Linux Mint 21.0, I tried it and it failed.

      Reply
  2. Hi Josh, sorry about the delay….bit busy ATM. I’ve upgraded both distros, so have LMDE5 and Mint21.1 now, but what processes would you recommend after failed Wine installation attempts? (….apt remove, uninstall etc)
    Any assistance gratefully received.
    Tom

    Reply
    • Hiya,

      Interesting, it is failing. Is there an output in your terminal when trying to upgrade? Getting this would be good. You can remove Wine with APT autoremove and –purge, then re-install.

      Thanks.

      Reply
    • Hi Tom,

      Just double-checking, everything is up-to-date. Like sudo apt update && sudo apt upgrade? Did you remove and purge and try to re-install?

      Also, one other thing, did it state which packages are failing?

      Reply

Leave a Comment

Index
Share to...