How to Install Wine in Ubuntu 20.04 / 18.04 / 16.04

How to install wine in Ubuntu 20.04, 18.04 and 16.04

If you are Windows user and have you changed your Operating System? Are you experienced with both Windows and Linux platforms?

If the answer is “Yes” then you may have question “Is there a way to run Windows application in Linux?”

“Yes”, It is possible to run Windows application in Linux flavoured OS using software called “Wine”, but it has some limitations. With the help of this application you will not be required to switch your OS from linux to Windows for the apps which are compatible with Wine.

Wine website has already published all the application which is compatibility with Wine. You can go through that list by visiting WineAppDB. However, you can still try to install the software which is not listed here.

In this tutorial we are going to learn how to install Wine 5.0 in Ubuntu 20.04, Ubuntu 18.04. This guide also works well for Ubuntu 16.04. I have also shared one of by blog which describes how to install application using Wine.

Let’s first understand what is Wine software actually and it’s features then we will move forward for installation part..!!

1) What is Wine software?

Wine is a free and open source software application that allows computer programs written for Microsoft Windows to run on Unix-like operating systems.

Here is the definition which is captured from Wine website:

  • Wine (originally an acronym for “Wine Is Not an Emulator”) is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. 
  • Instead of simulating internal windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop. 

2) What’s new in Wine 5.0?

Wine 5.0 release represents a year of development effort and over 7,400 individual changes. It contains a large number of improvements that are listed in the release notes below. Here are the key changes in version 5.0 as mentioned in the official site:

1) Builtin modules in PE format: Wine supports Portable Executable(PE) formats that describes the structure of executable image files of Microsoft operating systems.

2) Multi-monitor support: Wine 5.0 allows users to set up multiple monitors.

3) XAudio2 reimplementation: Wine 5.0 supports an audio API XAudio2 reimplementation for Microsoft platforms.

4) Vulkan 1.1 support: Wine 5.0 supports the latest Vulkan 1.1 which is cross-platform 3D graphics and a computational API system. Vulkan targets high-performance realtime 3D graphics applications such as video games and interactive media across all platforms.

Of course, there are much more features then above..!! You can check it out Wine Official announcement for detailed description.

3) Update apt repository

apt-get update downloads the package lists from the repositories. It also updates them to get information on the newest versions of packages and their dependencies. This ensures you install the latest stable version of Wine.

sudo apt-get update

4) Check if you have an Ubuntu 32-bit or 64-bit system

  • Open terminal through Ubuntu search or the Ctrl+Alt+T shortcut and use the below command to fetch CPU details:


The CPU op-mode(s) will let you know about the flavor of Ubuntu you are having on your system. If it is a 32-bit then you are running a 32-bit Linux OS, and if it is “32-bit, 64-bit” then you are running a 64-bit OS.

5) Enable 32-bit architecture

If you are running with a 64-bit system, we need to enable 32-bit architecture. Run below command to enable 32 bit architecture:

sudo dpkg --add-architecture i386

6) Add the WineHQ keys

Wine team has announced the latest stable release 5.0 on Jan 21, 2020. Its source code is available to download from its official site. This article will help you to install Wine 5.0 Stable release on various flavours of Ubuntu using WineHQ repository.

wget -qO- | sudo apt-key add -

Add winehq key

7) Add Wine repository via command

Ubuntu 20.04

sudo apt-add-repository 'deb focal main'

Ubuntu 18.04

sudo apt-add-repository 'deb bionic main'

For Ubuntu 16.04

sudo apt-add-repository 'deb xenial main'

8) Add PPA for libfaudio0 library:

sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport

9) Install Wine 5.0 via below command

sudo apt update

sudo apt install --install-recommends winehq-stable

Install winehq stable version in ubuntu
  • You can launch a windows application by double clicking on it OR by right click on the application and click “Open With Wine Windows Program”.
windows loader through wine

10) Check version of Wine application

Once the installation is completed confirm the wine installation by checking for the wine version:

wine --version

check wine version

11) Configuring Wine

  • In addition of installing Wine in Ubuntu system we should configure it first. If we don’t do so then it will ask to configure when we try to install any application through wine. To configure Wine run the “winecfg” command in terminal to install Mono and Gecko packages:


  • A dialog box will appear which asks you to whether you want to install the wine-mono package or not:
Configure Wine
  • Click on the “Install” button, and the installation will start. Once done, a new dialog will appear prompting you to install the Gecko package. Similarly installation of mono package, click on the “Install” button again.
wine gecko package install
  • When the installation is completed, the Wine configuration dialog will be shown. We should go ahead with the default settings as wine has configured it correctly. Close the dialog box to finish configuration.
finish wine configuration

12) How to install application through Wine?

After installing Wine application, the next question may arise how to install an application through wine? I have already written a brief tutorial about it. This tutorial explains installation of IDM in Ubuntu through Wine.

13) How to Update Wine?

Every software releases new updates to their users. Keeping Wine up to date allows you to take advantage of the latest features and security updates to keep you productive and secure.

You can easily download and apply update to your Wine application easily using following steps:

  1. Open terminal, and paste below command in terminal:

sudo apt-get upgrade winehq-stable

  1. You will be needed to enter password as we have fired this command with sudo.
  2. Press ‘y’ and hit enter when the system asks “Do you want to continue? [Y/n]”.
Upgrade wine version in ubuntu

You have successfully updated Wine on your computer.

14) How to Uninstall Wine?

You might need to uninstall Wine if it is not functioning properly or it’s not opening or need to reinstall it for whatever reason.

Uninstalling Wine is very easy and just need to fire only one command to uninstall from your system. Follow below steps to get it done:

  1. Open terminal, and paste below command in terminal.

sudo apt purge winehq-stable

  1. Enter password as we have fired this command with sudo.
  2. Press ‘y’ and hit enter when the system asks “Do you want to continue? [Y/n]”.
Uninstall/Remove Wine in ubuntu

You have successfully uninstalled Wine from your computer.

That’s all. You have successfully installed Wine in Ubuntu. We have also described the uninstallation process so you can easily remove wine from your system.

Did you enjoy this tutorial? Please like and share this post with your friends and colleagues. It will help and motivate us to post articles with quality content.

You May Also Like

About the Author: softwaretrickadmin

I am a professional software developer and founder of I have a passion for troubleshooting and solving software problems on Windows and Linux. I love to write articles for installation steps and troubleshooting software problems. I am always ready to accept challenges!!