wine on linux

Install Wine on Linux – A complete guide

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.

Unlike virtual machines or emulators, you do not need to install/possess Windows in order to use Windows software on Linux with Wine.

All the installed applications on wine are run into a simulated environment. Wine creates its own home and other necessary folders required for installing the software during the configuration.

This prevents malwares and other troublesome software escaping from the simulated environment and breaking into your main system.

There has never been a reported case of malwares being run through Wine and breaking your system; in simple terms security measures of wine ensures that windows malware do not raid your Linux system.

Currently there are more than 20,000 windows applications tested to run good on Linux and other platforms with wine.

You can check a  list of applications that has been tested to work with the latest version of wine here.

If the software that you want to install is not listed here, this doesn’t mean that it wont work, depending on the software and your system you should check if the software is compatible to run on your device using Wine.

Wine can run a lot of popular windows software including Microsoft office, Photoshop and even Steam. You can find the details of these on the database that I linked to previously.

There are other certain modules of wine available for installation of Windows components like DLL files, DirectX and others. I will discuss these at the end of this article.

Wine is freely available for download at its official website, while another software called  crossover is available under paid subscription that allows you to install and manage Wine easily.

Wine is free and open source, Ubuntu and Linux mint have wine available in their official repository so that you can install directly from the Software manager.

Read: Install a Software on Ubuntu / Linux Mint

To install Wine on Ubuntu or Linux mint via software manager see this.

Here is a list of operating systems that has been tested to work with Wine but as I said earlier if something has not been tested yet, this does not mean that it won’t work on your system. You will have to try it out yourself.

If found, you can report bugs and incompatibility of applications with wine here. To read more on Wine, visit the official wiki.

To get additional help on installion; you can visit the Wine official forums

Now lets jump directly into installing Wine on Linux.

Install Wine on Ubuntu

Follow these instructions to install Wine on Ubuntu and Ubuntu based systems like Linux mint and Pop OS.

If you have previously installed a Wine package from another repository, then remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts.

If your system is 64 bit, enable 32 bit architecture (if you haven’t already):

sudo dpkg --add-architecture i386

Some applications won’t run properly without enabling 32 bit architecture.

Download and add the repository key:

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

Adding these keys is necessary in order for our system to trust the packages from the corresponding source.

Add the repository:

For this version: Use this command: 
Ubuntu 20.04 sudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ focal main’
Ubuntu 18.04Linux Mint 19.Xsudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’
Ubuntu 16.04Linux Mint 18.xsudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main’

Update packages:

sudo apt update

Now we can easily download and install Wine from its repository that we added in the previous step.

Then install one of the following packages:

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

If you have no idea what the development and staging branches are for and want to use Wine just for installing and using windows software and games, then install from the Stable branch.

Stable branch is for daily uses while the others are intended for developers and testers.

If apt complains about missing dependencies, install them, then repeat the last two steps (update and install). See the FAQ entry on dependency errors for tips on troubleshooting dependency issues.

The installation is now complete, to check if wine has been installed and configured properly run

wine --version

This should output something like 

wine-5.0.2

Install Wine on Debian

To install Wine on Debian and Debian based distributions follow these instructions:

Enable 32 bit packages (if you haven’t already):

sudo dpkg --add-architecture i386

See the installation instruction for Ubuntu to know why we need to enable 32 bit architecture.

Download and add the repository key:

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

Adding these keys is necessary in order for our system to trust the packages from the corresponding source.

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

For this version: Add this content to /etc/apt/sources.list: 
Debian 10 (Buster) deb https://dl.winehq.org/wine-builds/debian/ buster main
Debian Testing (currently Bullseye) deb https://dl.winehq.org/wine-builds/debian/ bullseye main

You need to add this source URL at the bottom of the sources.list file.

To add these to the /etc/apt/sources.list you can either go to this directory and edit sources.list with your text editor or you can use nano in the terminal:

sudo nano /etc/ap/sources.list

Update packages:

sudo apt update

Now we can easily download and install Wine from its repository that we added in the previous step.

Install one of the following packages:

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

If you are not a developer or a tester then use the command for Stable branch.

Stable branch is for daily uses while the others are intended for development and beta testing purposes.

If it complains about missing dependencies then install them and repeat the last two steps.

Read: Install Ubuntu 20.04 – Full tutorial

To check the version of your Wine installation and if it has been installed properly, run:

wine --version

If everything works fine and Wine is installed, you will see an output similar to this:

wine-5.0.2

Install Wine on Fedora

The commands given for Fedora on WineHQ does not seems to work, so we are going to use these instructions instead:

First clean and update all packages:

sudo dnf clean all
sudo dnf update

Now add the WineHQ repository to your system.

For this version: Use this command: 
Fedora 32dnf config-manager –add-repo https://dl.winehq.org/wine-builds/fedora/32/winehq.repo
Fedora 31dnf config-manager –add-repo https://dl.winehq.org/wine-builds/fedora/31/winehq.repo
Fedora 29sudo dnf config-manager –add-repo https://dl.winehq.org/wine-builds/fedora/29/winehq.repo

We can now proceed to install WineHQ.  Choose any one version from below, if you have no idea which version to choose, then install the Stable version.

Stable branchsudo dnf install winehq-stable
Development branchsudo dnf install winehq-devel
Staging branchsudo dnf install winehq-staging

Once the installation is complete, use the following command to verify:

wine --version

On a successful installation, it should output something like this.

wine 5.02

Installing Wine on openSUSE

Start by adding Wine repository to your OpenSUSE system:

For this versionUse this Command
Leap 15sudo zypper ar -r https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_15.0/Emulators:Wine.repo
Leap 42.3sudo zypper ar -r https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_42.3/Emulators:Wine.repo
Leap 42.2sudo zypper ar -r https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Leap_42.2/Emulators:Wine.repo
Tumbleweedsudo zypper ar -r https://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_Tumbleweed/Emulators:Wine.repo

If you are using an older version of openSUSE then check out the openSUSE wiki for other repo URLs.

Once the repo is added, refresh the cache of Zypper and when asked if the new key should be trusted enter “a”.

sudo zypper ref

Finally Install Wine using the following command:

sudo zypper in wine

To check if the installation completed successfully and wine version use:

wine --version

The output will be similar to this

wine 5.0.2

Install Wine on Linux with CrossOver

CrossOver is a polished version of Wine provided by CodeWeavers. CrossOver makes it easier to use Wine and CodeWeavers provides excellent technical support to its users.

 All purchases of CrossOver are used to directly fund the developers working on Wine. So CrossOver is both a great way to get support in using Wine and to support the Wine Project. 

However, CrossOver is not FOSS. You need to purchase a license in order to use it. You can see the installation instruction for CrossOver and other Linux apps here.

Due to the same reason I have mentioned CrossOver at the bottom of this article. By purchasing CrossOver you directly contribute in funding Wine, they also provide a 10 days free trial.

Install Wine on Ubuntu / Linux mint from Software manager

You can install Wine on both Ubuntu and Linux mint directly from the Software manager. Even though I usually recommend installing software from the Software manager, this time I ask you to use the above given methods instead.

From the menu, open Software manager.

Wine on linux

Now search for Wine in the software manager

ch for wine in the software manager

Install the following packages from the software manager 

  • Wine Stable
  • Winehq hqstable
  • Winetricks

If you are on 64 bit architecture, which all latest computers purchased after 2013 have then install the following package too.

  • Wine-stable-amd-64

Now open terminal and type the following command:

nano ~/.profile

Press Ctrl+W, then Ctrl+V to move the cursor to the bottom. Add the following line at the end of the file.

export PATH=”$PATH:/opt/wine-stable/bin”

To save the file, press Ctrl+O, then press Enter to confirm. To exit the file, press Ctrl+X. After that, log out and log back in for changes in .profile to take effect.

Now use the following command to check for Wine version and if it has been successfully installed:

wine --version

The output will be similar to this:

wine 5.0.2

Configure Wine

Once you have installed Wine properly on your system, it’s time we start configuring it. To configure Wine, open terminal ans type the following command:

winecfg

It will not create the wine configuration, a new folder will be created for this configuration. You can find this folder under your home directory as .wine . The exact location should be /home/<user>/.wine

A configuration windows will now pop up:

wine configuration menu

If an other windows appear before this, asking for Installation of Mono and HTML package then click Install and install those packages.

Here, you can configure wine as per your needs. You can also see a list of DLLs installed.

Using Winetricks

In the previous step I asked you to install Winetricks. If you have not installed it yet then you can download it directly from your operating system’s software manager.

From the menu search and launch Winetricks. It grants you more control over Wine and using Winetricks you can change wine configurations and make and select wine prefixes.

You can also install certain Windows DLL files directly from Winetricks easily.

using winetricks with wine on linux

Final Words

Wine is a really amazing software, it allows you to run windows applications as if they were native to Linux.

Subscribe to our newsletter to keep updates about more Wine related stuff. Got any issues? – Drop them in the comments below.

chevron_left
chevron_right