Wine (short for “Wine Is Not an Emulator”) is a compatibility layer that lets you run Windows applications on Linux, macOS, and FreeBSD. Instead of emulating Windows hardware, Wine translates Windows system calls into equivalent POSIX calls that Linux understands natively.
This means you can run many Windows programs directly on Ubuntu without needing a Windows license or a separate Windows installation. Unlike virtual machines like VirtualBox or VMware, Wine does not need its own operating system and uses far fewer system resources.
Wine is not perfect. Not every Windows app will work, and some may behave differently than expected. Check the Wine AppDB database to see if your application is known to work before you start.
This guide shows you how to install Wine on Ubuntu 18.04 using the default repositories (version 3.0) or the official WineHQ repository for version 5.0. The same steps apply to Ubuntu 16.04 and other Ubuntu-based distributions.
Prerequisite: You need sudo access to install packages.
This is the easiest way to get Wine running. The version in Ubuntu’s repositories is 3.0, which is stable and works for most common use cases.
Most Windows applications are 32-bit, so first enable 32-bit architecture support:
bashsudo dpkg --add-architecture i386sudo apt update
Install Wine:
bashsudo apt install wine64 wine32
Verify the installation:
bashwine --version
Output:
wine-3.0 (Ubuntu 3.0-1ubuntu1)
Wine 3.0 is now installed on your Ubuntu machine.
If you need a newer version of Wine, install it directly from the official WineHQ repository. This gives you Wine 5.0, the latest stable release at the time of writing.
Enable 32-bit architecture and update:
bashsudo dpkg --add-architecture i386sudo apt update
Import the WineHQ GPG key:
bashwget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
Add the WineHQ repository:
bashsudo apt install software-properties-commonsudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
Wine 5.0 depends on the FAudio package, which is not in Ubuntu 18.04’s default repositories. Add the OBS repository to get it:
bashwget -qO- https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_22.04/Release.key | sudo apt-key add -sudo sh -c 'echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_22.04/ ./" > /etc/apt/sources.list.d/obs.list'sudo apt update
Install Wine 5.0:
bashsudo apt-get install --install-recommends winehq-stable
Verify the installation:
bashwine --version
Output:
wine-5.0
Before running any Windows app, set up the Wine environment:
bashwinecfg
This command installs two important components:
Two dialogs appear one after the other. Click Install for both. Once done, the Wine configuration window opens. The default settings work fine for most applications. Review them if needed and then close the window.
With Wine configured, you can install and launch Windows applications on your Ubuntu desktop.
Here is how to install Notepad++ as an example:
.exe installer from the Notepad++ download page.exe file and choose Open With Wine Windows Program LoaderWindows apps are installed in the ~/.wine/drive_c/ directory. To launch Notepad++, navigate to ~/.wine/drive_c/Program Files (x86)/Notepad++/ and double-click notepad++.exe.
You can also launch it from the terminal:
bashwine ~/.wine/drive_c/Program\ Files\ \(x86\)/Notepad++/notepad++.exe
Wine is now installed and configured on your Ubuntu 18.04 system. You can start running Windows applications without leaving Linux. For apps that do not run well in Wine, a full virtualization setup with KVM or VirtualBox is your next best option. Got questions? Leave a comment below.
Setting a static IP address on your server is a smart move. It ensures your…
Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP). It lets you access…
Managing user accounts is one of the most basic system administration tasks on any Linux…
KVM (Kernel-based Virtual Machine) is an open-source virtualization technology built into the Linux kernel. It lets…
Ubuntu 20.04 LTS (code name Focal Fossa) was released on April 23, 2020. It is a…
Google Chrome is the most widely used web browser in the world. It is fast, secure,…