How to Install Wine on Ubuntu 18.04 Bionic Beaver

This is a step-by-step guide to how to install wine on Ubuntu 18.04 LTS.

Not all software supports Ubuntu, Most of them are not available in the Ubuntu software repository or in deb format which is the package format used in Ubuntu. So If you want to install a software that comes in exe or msi format, then you need "Wine Windows Program Loader".

Wine is an implementation of the Microsoft Windows API that handle Windows programs. With wine you can run windows programs directly on your Ubuntu 18.04 desktop.

To install wine on Ubuntu 18.04, Log into your Ubuntu desktop, open the terminal window and do the following steps:

  1. First, Configure Ubuntu wine repository with following set of commands:

    sudo dpkg --add-architecture i386
    wget -nc https://dl.winehq.org/wine-builds/Release.key
    sudo apt-key add Release.key
    sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
  2. Next, Update the package repository and install the winehq-stable package:

    sudo apt-get update
    sudo apt-get install --install-recommends winehq-stable
  3. After the installation is finished, run the winecfg command to configure wine:

    winecfg

When you run winecfg command, first it will ask for the confirmation to download necessary packages. This includes wine-mono and Gecko packages. Next, you will get the configuration window.

After the installation is finished, run the winecfg command to configure wine

Under the Applications, Select windows 7 as the windows version and click ok.

The winecfg command also creates the wine configuration directory (.wine) in your home directory (/home/username/.wine).

.wine virtual c drive ubuntu

When a new software is installed, you can find it in the .wine/drive_c/Program Files (or Program Files (x86))folder in your home folder.

Note that, .wine is a hidden folder so you may not see it in the file manager, In the file manager (GUI), you need to choose Show Hidden Files from the menu to see hidden folders.

How to use wine to install windows software on Ubuntu

Let’s install a Windows software on our Ubuntu 18.04 desktop to test the Wine Windows Program Loader. For this example, I am going to install a Chess software called Lucas Chess, but you can install any other software you want.

The point is when you get the windows installer (.exe or .msi), right click on the installer and click "Open With Other Application" if you don't see the "Wine Windows Program Loader" already.

From the Application List, select "Wine Windows Program Loader".

How to use wine to install windows software on Ubuntu

You will get the installation wizard in the same way as if you are using Microsoft Windows.

Install Lucas Chess on Ubuntu wine

Wine will also create the launcher icon which you can find in Ubuntu application menu.

The software will be installed to the Program files directory in the Virtual C drive. In this example, Lucas Chess was installed in the .wine/drive_c/Program Files (x86)/LucasChess/.

Ubuntu Wine windows program installation directory

Inside the installation directory, we have the Lucas.exe file that launches the program.

Create a Desktop Launcher

If you can't find the menu icon to the software, create a text file on your desktop with .desktop extension (e.g. "Lucas Chess.desktop") and add the following configuration:

[Desktop Entry]
Name=Lucas Chess
Exec=env WINEPREFIX="/home/username/.wine" wine "/home/username/.wine/drive_c/Program Files (x86)/LucasChess/Lucas.exe"
Type=Application
StartupNotify=true
Icon=E12D_Lucas.0

In the configuration, you should replace "Exec=" line accordingly.

The "Icon=" should be replaced by the name of the menu icon (You should be able to find icons in your home folder, inside the .local/share/icons/ directory).

To activate the launcher, right click on the desktop file, Click Properties > Permissions and select "Allow executing file as program".

Create a Desktop Launcher for wine program

Then, double click on the desktop file and click "Trust and Launch".

Uninstall a Program installed with wine

Just in case you want to uninstall any program, open the Ubuntu terminal and execute:

wine uninstaller

You will get the "Add/Remove Programs" window. Here select the wine program you uninstall and click on the "Modify/Remove" button.

Uninstall a Program installed with wine in Ubuntu 18

Summary

In this tutorial we learned how to run windows program on Ubuntu 18.04 Bionic Beaver with wine windows program loader.

Wine is an open-source implementation of the Windows API that runs on top of the your Ubuntu Linux system. With wine you can install most of the windows software on Ubuntu.