How to Install Wine on Debian, Ubuntu and Linux Mint

Wine is an open-source, free and easy-to-use program that enables Linux users to run Windows-based applications and games on Unix-like operating systems. Wine is a compatibility layer for installing almost all versions of Windows programs.

Wine 7.0 is finally released and it comes with an array of numerous enhancements and a total of 40 bug fixes. You can find out all the new features and changelog of this new release on the Wine announcement project page.

This article describes a few easy steps to install the latest stable version of Wine 7.0 under Debian 11/10, Ubuntu 22.04-18.04, and Linux Mint 20-19 systems, and also we will see how to configure wine, install windows software, and Un-install.

[ You might also like: How to Install Wine on RHEL-based Linux Distributions ]

Installation of Wine on Debian, Ubuntu, and Linux Mint

If you are looking to have the most recent version of the Wine 7.0 stable series, you have to use a new Wine repository PPA which offers both development versions and stable versions of Wine for Debian, Ubuntu, and Linux Mint.

Install Wine on Ubuntu and Linux Mint

To install Wine 7.0 on Ubuntu and Linux Mint, open the terminal by hitting 'CTRL + ALT + T‘ from the desktop and run the following commands to install it:

$ sudo dpkg --add-architecture i386    [Enable 32-bit Arch]
$ sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

Add the repository:

For this version: Use this command:
Ubuntu 22.04 sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
Ubuntu 21.10 sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/impish/winehq-impish.sources
Ubuntu 20.04
Linux Mint 20.x
sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
Ubuntu 18.04
Linux Mint 19.x
sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources

Update packages and then install one of the following packages:

For this version: Use this command:
Stable branch sudo apt install --install-recommends winehq-stable
Development branch sudo apt install --install-recommends winehq-devel
Staging branch sudo apt install --install-recommends winehq-staging

Install Wine on Debian

To install Wine on Debian.

$ sudo dpkg --add-architecture i386
$ sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

Download the WineHQ sources file:

For this version: Use this command:
Debian 11 (Bullseye) sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources
Debian 10 (Buster) sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/buster/winehq-buster.sources

Now update the package repository database and install Wine as shown.

For this version: Use this command:
Stable branch sudo apt install --install-recommends winehq-stable
Development branch sudo apt install --install-recommends winehq-devel
Staging branch sudo apt install --install-recommends winehq-staging

Installing Wine Using Source Code on Debian, Ubuntu & Mint

Another way to get the most recent stable version of Wine (i.e. 7.0 as of now), is to build wine from source tarball using the following commands.

$ wget https://dl.winehq.org/wine/source/7.0/wine-7.0.tar.xz
$ tar -xvf wine-7.0.tar.xz
$ cd wine-7.0/
$ sudo ./configure 
$ sudo ./configure --enable-win64   [For 64-bit platform]
$ sudo make && sudo make install

How to Use Wine to Run Windows Apps & Games

To demonstrate how we can run Windows program using wine, we have downloaded Rufus .exe file from the official Rufus download page.

To run Windows Rufus executable file, run the command:

$ wine rufus-3.19.exe
Run Windows Program in Ubuntu
Run Windows Program in Ubuntu

Once you run the program, Wine will start creating a configuration file in the user’s home directory, in this case, ~/.wine as shown.

Wine Configuration
Wine Configuration

During Wine configuration, it will as you to install the wine-mono-package which is required by .NET applications, click the ‘Install’ button.

Wine Mono Installer
Wine Mono Installer

The download will soon start.

Downloading Wine Mono Installer
Downloading Wine Mono Installer

Additionally, it will also ask you to install the Gecko package which is required by applications embedding HTML.

Wine Gecko Installer
Wine Gecko Installer

Choose whether you want to check for application updates from time to time.

Rufus Update Policy
Rufus Update Policy

Finally, the Rufus will be displayed as shown.

Rufus Programe Running on Ubuntu
Rufus Program Running on Ubuntu

We have successfully installed Wine on Debian, Ubuntu, and Linux Mint and shown you a preview of how you can run Windows applications in a Linux environment.

Uninstalling Wine in Debian, Ubuntu, and Linux Mint

If you are not happy with the wine program, you can remove it completely by using the following command.

$ sudo apt purge winehq-stable

You can also download the Wine source package for other Linux distributions from the wine download page.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

157 thoughts on “How to Install Wine on Debian, Ubuntu and Linux Mint”

  1. Hey, I used the commands given in this article to install Wine and this worked for me in Linux Mint 19.1, but it later also gave an annoying problem with the faulty release key, according to updates.

    Reply
  2. Hi,

    I use Debian 9.7 and try install wine4.0 but I get some errors, like:

    Err: 4 https://dl.winehq.org/wine-builds/debian jessie InRelease
    The following signatures could not be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
    Err: 6 https://dl.winehq.org/wine-builds/debian stretch InRelease
    The following signatures could not be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
    Err: 7 https://dl.winehq.org/wine-builds/debian buster InRelease
    The following signatures could not be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F

    If I use:

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

    I get:

    apt-key add winehq.key
    key 76F1A20FF987672F:
    1 signature not checked due to a missing key
    

    I try:

    apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 76F1A20FF987672F
    

    And

    key 76F1A20FF987672F:
    1 signature not checked due to a missing key
    gpg: key 76F1A20FF987672F: public key “WineHQ packages ” imported
    gpg: Total number processed: 1
    gpg: imported: 1

    But the command not finish…

    Please, any help…

    Thanks

    André

    Reply
  3. I totally agree with: Enrique Carlos Toomey message @ January 5, 2019 at 7:34 pm

    I used the commands given in this article to install Wine and this worked for me in Linux Mint 19.1, but it later also gave an annoying problem with the faulty release key, according to updates. The key is changed per 2018-12-19 as on the following page with the original info; https://wiki.winehq.org/Ubuntu > Please update this article!

    Reply
  4. I needed to add the following key for apt to be able to find winehq:

    $ wget -nc https://dl.winehq.org/wine-builds/winehq.key
    $ sudo apt-key add winehq.key
    
    Reply
  5. I tried to install Wine on Debian 9.6 and it bombed here when I tried to add the release key:

    gpg: WARNING: nothing exported
    gpg: no valid OpenPGP data found.
    gpg: Total number processed: 0

    Reply
  6. This worked on my Mint 18.2 but on my laptop (18.0) Wine 3 was installed but there was no Wine or Wine Config in the menus – somewhat annoying for a linux Newbie!

    Reply
  7. Followed your terminal ‘Installation of Wine 3.0″ on Lubuntu18.04 All good.

    Wine auto suggested downloads, Wine Mono and Wine Gecko. All Successful.

    Cheers. Wine running.
    Thanks

    Reply
  8. In order to get extra functionality, more packages should be installed. The ‘configure‘ order retrieve the information needed. For Debian (testing), some of them (those that were missing in my system) can be installed with:

    sudo aptitude install libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libxcomposite-dev libosmesa-dev libpcap0.8-dev libdbus-1-dev libncurses-dev libsane-dev libv4l-dev libgphoto2-dev liblcms2-dev libpulse-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev libudev-dev libcapi20-dev libfontconfig1-dev libgsm1-dev libkrb5-dev libtiff-dev libmpg123-dev libopenal-dev libldap-dev libgettextpo-dev gettext libxrender-dev libxml2-dev libxslt1-dev libgnutls28-dev libjpeg-dev libjpeg62-turbo-dev

    I hope that this help someone.

    Reply
  9. I did the install to change to 3.0 as listed above without any problems or error message. But when I run wine –version it says “wine-2.04”. I was at “wine-2.8” before I started.

    Reply
    • @Ralph,

      Sorry to hear that, but on which Linux distribution have you tried? Have you added correct PPA wine repository to your distribution?

      Reply

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.