How to Install Wine 4.0 in Ubuntu 18.10, 16.04, 14.04

Wine running Windows apps on Linux

Wine, a free compatibility layer to run Windows applications on Linux, released 4.0 stable recently. Here’s how to install it in Ubuntu 18.04, Ubuntu 16.04, Ubuntu 14.04, Linux Mint 18.x and 19.

Wine 4.0 is a big release that features:

  • Vulkan support.
  • Direct3D 12 support.
  • Game controllers support.
  • High-DPI support on Android.
  • See announcement for more.

The official wine repository offers Ubuntu packages for all current Ubuntu releases, so you can easily install it via following steps:

1. Open terminal from application menu, then run command to enable 32 bit architecture:

sudo dpkg --add-architecture i386

Type user password (no visual feedback) when it prompts and hit Enter.

2. Run command to download and add the repository key:

wget -nc https://dl.winehq.org/wine-builds/winehq.key

sudo apt-key add winehq.key

wine-key

3. For Ubuntu 18.04, Linux Mint 19.x, run command to add the repository:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

For other releases, replace bionic in the code with:

  • cosmic for Ubuntu 18.10.
  • xenial for Ubuntu 16.04, and Linux Mint 18.x.
  • trusty for Ubuntu 14.04.

wine-repo

4. Finally check system package cache and install Wine 4.0:

sudo apt-get update

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

For Ubuntu 18.04 and higher, you can skip apt-get update as it’s done after adding PPA.

install-wine-stable

How to Use Wine in Ubuntu:

Once installed, you need to generate configuration file by running command:

winecfg

It prompts you to install some libraries and finally launches the configuration dialog.

wine-config

To run a .exe file, right-click on file, select “Open with Other Application”, and choose “Wine Windows Program Loader”.

open-exe-via-wine

Uninstall:

To remove Wine repository, go to Software & Updates -> Other Software, highlight the repository line and remove it.

remove-wine-repo

To remove wine, run command in terminal:

sudo apt-get remove --autoremove wine-stable winehq-stable

About ml

ml is a part time stay-at-home dad who've been using Ubuntu Desktop for a few years. He writes in the free time and wishes to share some useful tips with Ubuntu beginners and lovers.

6 comments

  1. I am running ubuntu 18.04. Using the instructions from “How to Install Wine 4.0 in Ubuntu 18.10, 16.04, 14.04”

    After proper executing steps with responses to this point:

    sudo apt-key add winehq.key
    OK

    When I execute the following:

    sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’

    This is the response I get:

    E: Malformed entry 46 in list file /etc/apt/sources.list (Component)
    E: The list of sources could not be read.

    Any suggestions?

    • I had the same issue. In my case, it was the link on this command ” sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/
      ubuntu/ bionic main’ ” wasn’t copied correctly. It was due to a space in ” https://dl.winehq.org/wine-builds/ ubuntu/ “. So I used ” sudo apt-add-repository –remove ‘deb https://dl.winehq.org/wine-builds/ ubuntu/ bionic main’ ” (or something like that) to remove the previously typed command, I then corrected the link in the command to” sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’ and it worked. Also be sure to replace ‘bionic’ with the what corresponds to your version, using the wrong one also causes problems. I was working with 14.04, so I used “trusty”. It worked like charm.
      I hope it helps. I’m a novice with Ubuntu.
      Thanks to the author.

  2. The same problem.

  3. Dear Ubuntu-Experrs,
    followed your instructions this afternoon on my ubuntu 18.04.2 laptop, and … it works like a charm!

    Thank you very much
    Harro Pahl

  4. Thank you! I appreciate this. It worked perfectly.

  5. Installed Successfully Thanks, After installation first run success But No internet , No data connection in safari, after closing window No idea how to reopen the installed package(I’m beginner) Please solve these two problems. Thanks a lot