Wine 4.0 Stable Released – Install on Debian, Ubuntu and Linux Mint

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

Read also : Install Wine 4.0 in RedHat / CentOS / Fedora

This article describes a few easy steps to install latest stable version of Wine 4.0 under Debian 9-8, Ubuntu 18.10-16.04 and Linux Mint 19-17 systems and also we will see how to configure wine, install windows software’s and Un-install.

You can find out all the new features and change log of this new release at Wine announcement project page.

Installation of Wine 4.0 on Ubuntu, Linux Mint and Debian

If you looking to have a most recent version of Wine 4.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.

To install Wine 4.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:

----------------- On Ubuntu & Linux Mint ----------------- 
$ sudo dpkg --add-architecture i386    [Enable 32-bit Arch]
$ wget -nc
$ sudo apt-key add winehq.key
$ sudo apt-add-repository 'deb cosmic main' [Ubuntu 18.10]
$ sudo apt-add-repository 'deb bionic main' [Ubuntu 18.04 & Linux Mint 19.x]
$ sudo apt-add-repository 'deb xenial main' [Ubuntu 16.04 & Linux Mint 18.x]

$ sudo apt-get update
$ sudo apt-get install --install-recommends winehq-stable

To install Wine on Debian.

$ sudo dpkg --add-architecture i386
$ wget -nc
$ sudo apt-key add winehq.key

Next add the following repository to /etc/apt/sources.list or create a *.list under /etc/apt/sources.list.d/ with the following content.

deb jessie main    [Debian 8 (Jessie)]
deb stretch main   [Debian 9 (Stretch)]
deb buster main    [Debian 10 (currently Testing) (Buster)]

Note: Don’t forget replace DISTRO with your Debian release either wheezy, jessie, stretch or sid.

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

$ sudo apt-get update
$ sudo apt-get install --install-recommends winehq-stable

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

$ wget
$ tar -xvf wine-4.0.tar.xz
$ cd wine-4.0/
$ sudo ./configure 
$ sudo ./configure --enable-win64   [For 64-bit platform]
$ sudo make && sudo make install

Starting Wine 4.0

To start the Wine program, you must give the full path to the .exe program. For example, we will start the notepad.exe program through wine.

$ wine notepad.exe
Start Wine in Ubuntu

Starting Wine in Ubuntu

Configure Wine 4.0

The default wine configuration is much enough for running windows applications, but not all windows based applications run under wine. And in some cases you may required an extra configuration to run certain applications or adding a new windows drive for mapping CD-ROM drives.

The wine configuration is done by ‘winecfg‘ utility, so in order to configure wine run the following command on the terminal.

$ winecfg
Configure Wine in Ubuntu

Configuring Wine in Ubuntu

To add new drive click on ‘Drives‘ –> ‘Add Drive‘ and then give full path of the cdrom. See the below screenshot.

Add Drivers in Wine

Adding CD-ROM Drive in Wine

This is very useful for installing games and applications using cdrom with wine under your Ubuntu box.

Install Windows Software’s Using Winetricks

Winetricks is a small helper script for downloading and installing windows based software’s and missing DDL files that needed to run some programs under wine. To download and install software programs, run the ‘winetricks‘ utility from the terminal. Please note that the winetricks current prefix is user’s home directory (i.e. /home/user/.wine). So, whatever you install it goes under this directory.

$ winetricks

While running ‘winetricks‘ you might get following error message:

/usr/bin/winetricks: 2201: /usr/bin/winetricks: cannot create /tmp/early_wine.err.txt: Permission denied
wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message 'wine: /home/tecmint/.wine is not owned by you'

To fix such permission error run the following command and replace the username with your own user.

# sudo chown -R username:username /tmp/early_wine.err.txt
$ winetricks
Start Winetricks in Ubuntu

Starting Winetricks in Ubuntu

It will ask you one time question about helping winetricks development by submitting reports on wine statistics. Just click on ‘Yes‘.

Winetricks report

Submit Winetricks Report

Click on ‘OK‘ button to move forward. If you don’t want to submit reports to winetricks, then simple turn-off with the command ‘winetricks –optout‘.

Turn-off Winetricks report

Turn-off Submitting Winetricks Reports

Next, select ‘Install a Windows DLL or component‘.

Install Software Using Wine

Install Software Using Wine

Select the software that you wish to install. Let’s say I would like to install Internet Explorer 8.

Download and Install Wine Softwares

Download and Install Wine Softwares

The utility automatically download and install the selected software from the winetricks table.

Winetricks Download and Install Softwares

Winetricks Download and Install Softwares

Once, the download and installation completes, it will automatically start the program. See the screenshot below.

Wine start Programs

Starting Programs with Wine

You can also start the program by specifying full path of the program like.

$ sudo wine 'C:\Program Files\Internet Explorer\iexplore'

As I said above that not all programs will work with wine. So, I recommend you to check out the Wine app database before installing any software through wine.

Uninstalling Windows Software using Winetricks

If you want to uninstall the Internet Explorer with winetricks just type the following command it will completely delete the program. You also directly delete the program directory from the .wine directory like shown below.

$ sudo rm -rf .wine/drive_c/Programe\ Files/Internet\ Explorer/

Uninstalling Wine and Winetricks

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

$ sudo apt purge winehq-stable

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

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

147 Responses

  1. prestigedecanters says:

    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.

  2. André Luiz Fassone Canova says:


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

    Err: 4 jessie InRelease
    The following signatures could not be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
    Err: 6 stretch InRelease
    The following signatures could not be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
    Err: 7 buster InRelease
    The following signatures could not be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F

    If I use:

    $ wget -nc
    $ 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:// --recv-key 76F1A20FF987672F


    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…



  3. a says:

    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; > Please update this article!

  4. Enrique Carlos Toomey says:

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

    $ wget -nc
    $ sudo apt-key add winehq.key
    • Ravi Saive says:


      I have updated the article and included recent Wine installation instructions for Ubuntu, Debian and Linux Mint.

  5. Rick says:

    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

  6. R Fearnley says:

    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!

  7. iPhone and iPad Firmware says:

    Installation of Wine 3.0″ on Lubuntu18.04 All good.

  8. Tom says:

    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.

  9. Hernán says:

    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.

  10. Ralph Jones says:

    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.

    • Ravi Saive says:


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

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.