How to Install and Use Wine on the Latest Ubuntu – Wine is a popular open source software compatibility layer that allows you to run Windows applications or software on Unix-like operating systems such as Linux, FreeBSD, and macOS. Wine stands for (Wine Is Not an Emulator). It is an interface that translates Windows system calls into the equivalent POSIX calls used by Linux and other Unix-based operating systems. Read → Complete Guide: How to Install Linux Ubuntu 18.04 LTS Desktop.
Wine isn’t always the best option for running Windows programs on Linux. Not all Windows applications will run in Wine, even if the software is successfully installed, the software may not run normally as in Windows. The AppDB Wine database contains a list of applications that have been tested and confirmed to work under Wine.
You can also use virtualization software such as VirtualBox or VMware, but they require more system resources and Windows installation.
In this article, I will explain how to install Wine on the latest Ubuntu 18.04. I will show you how to install a stable distro version 3.0 and the latest version of Wine 4.0. The same instructions apply for Ubuntu 16.04 and any Linux distro based on Ubuntu, including Linux Mint and Elementary OS.
Requirements before installing Wine
To be able to install new packages on your Ubuntu operating system, you must be logged in as a user with access rights
sudo. Read → How to Create a Sudo User and a Sudo Group on Ubuntu
How to Install Wine 3.0 on Ubuntu
Wine packages are included in Ubuntu’s default repositories and can be easily installed with the package manager
apt. This is the easiest way to install Wine on Ubuntu. However the version included in the repository may lag behind the latest Wine version.
Start by updating the packages list with the command:
$ sudo apt update
Next, install Wine by typing the following command:
$ sudo apt install wine64
After the installation is complete, use the wine –version command to print the Wine version:
$ wine --version
At the time of writing this article, the current Wine version available in the Ubuntu 18.04 repositories is 3.0.
wine-3.0 (Ubuntu 3.0-1ubuntu1)
How to Install Wine 4.0 on Ubuntu
In this section, I will provide step by step instructions on how to install Wine version 4.0 on Ubuntu 18.04.
First, import the GPG Key from the WineHQ repository onto your system using the following wget command:
$ wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
Add the WineHQ repository by running the following command:
$ sudo apt install software-properties-common
$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main'
Install the Wine 4.0 package by typing:
$ sudo apt-get install --install-recommends winehq-stable
Verify the Wine installation by typing:
$ wine --version
The output will look like this:
wine-4.0 (Ubuntu 3.0-1ubuntu1)
How to Configure Wine
To configure Wine run the winecfg command in your terminal which will install Mono and Gecko and set up the Wine environment:
A dialog will appear asking if you want to install mono.
Click the “Install” button, and the installation will begin. When finished a new dialog will appear asking you to install Gecko. Again click on the “Install” button.
In the Wine configuration dialog, you can configure various Wine settings. The default settings are fine in most cases. When done, close the dialog box.
Install Notepad ++ on Ubuntu
Now that Wine is finished installing and configured, we’ll explain how to install Windows apps on your Ubuntu.
In this tutorial, I will install Notepad ++, which is one of the most popular text editors among Windows users. Open your browser and download the Notepad ++ installation file from the Notepad ++ download page.
After the download is complete, start the installation by right clicking on the file
.exe and selecting “Open With Wine Windows Program Loader”.
The installation wizard will start, select a language and install Notepad ++ in the same way you would install any application on your Windows computer.
Windows applications are installed in the directory
To start the Notepad ++ editor navigate to the directory
~/.wine/drive_c/Program Files (x86)/Notepad++.
And double click on the file
You have now successfully installed and configured Wine on your Ubuntu 18.04 desktop. I’ve also shown you how to install and start Windows applications under Wine.
Hopefully this article was useful for you and good luck using Linux Ubuntu to replace the Windows operating system. Good luck 🙂