In this tutorial, we are going to install Wine 7 on Ubuntu 20.04.
Wine is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems i.e Linux, macOS, and BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls instantly eliminating the performance and memory penalties of other methods and allowing you to integrate Windows applications in your desktop.
What’s new in Wine 7 release
- Reimplimentation of winMM joystick driver
- All unix libraries converted to the syscall-based libraries
Benefits of Using Wine
- Unix has made it possible to write powerful scripts, Wine makes it possible to call windows applications from scripts that can also laverage Unix environment.
- Wine makes it possible to access Windows applications remotely.
- Wine makes it possible to use thin clients i.e install Wine and you will easily connect to windows applications using x-terminal.
- Wine is open-source so you can easily extend to suite your needs.
- Wine can be used to make existing windows applications available on the web by using VNC and its Java/HTML5 client.
Install Wine on Ubuntu 20.04
Wine comes preinstalled with Ubuntu systems, but there is one thing to consider, for 64-bit architecture you need to enable 32 bit for Wine to run effectively.
Before running Wine installation make sure you don’t have previous Wine in your system. Uninstall before running the newer version.
1. Run system updates
First, let’s run system updates with the following command.
$ sudo apt update $$ apt upgrade -y
2. Enable 32 bit wine architecture
Wine runs on a 32-bit architecture, so to get it up and running we need to enable 32-bit architecture. To do so run the following command on your terminal.
$ sudo dpkg --add-architecture i386
3. Add repository key
To sign our repository with key, we need to download the key from the following:
$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
Then you have to add the downloaded key. Use the following command to accomplish that.
$ sudo apt-key add winehq.key
Ok will be the output.
4. Add WineHQ Repository to Ubuntu 20.04
To add winehq repository to our system run the following command.
$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
If you don’t run into any errors, now then you can run system updates to update our repositories again
$ sudo apt update Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease Hit:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease Hit:3 http://mirrors.digitalocean.com/ubuntu focal InRelease Hit:4 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease Hit:5 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease Hit:6 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date.
5. Install Wine on Ubuntu 20.04
There are three versions of wine to be installed, stable, development, and staging branches. Let’s see how we can install it on Ubuntu 20.04.
Install Wine stable version
To install the stable version of Wine run the following command.
$ sudo apt install --install-recommends winehq-stable
Sample output will look like this
.... Adding saned group and user... Adding user saned to group scanner Setting up wine-stable-amd64 (6.0.2~focal-1) ... Processing triggers for udev (245.4-4ubuntu3.14) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for systemd (245.4-4ubuntu3.14) ... Processing triggers for man-db (2.9.1-1) ... Setting up libgdk-pixbuf2.0-0:i386 (2.40.0+dfsg-3ubuntu0.2) ... Setting up libharfbuzz0b:i386 (2.6.4-1ubuntu4) ... Setting up libcairo-gobject2:i386 (1.16.0-4ubuntu1) ... Setting up libgstreamer1.0-0:i386 (1.16.2-2) ... Setcap worked! gst-ptp-helper is not suid! Setting up libpango-1.0-0:i386 (1.44.7-2ubuntu4) ... Setting up libgstreamer-plugins-base1.0-0:i386 (1.16.2-4ubuntu0.1) ... Setting up gstreamer1.0-plugins-base:i386 (1.16.2-4ubuntu0.1) ... Setting up libpangoft2-1.0-0:i386 (1.44.7-2ubuntu4) ... Setting up libpangocairo-1.0-0:i386 (1.44.7-2ubuntu4) ... Setting up librsvg2-2:i386 (2.48.9-1ubuntu0.20.04.1) ... Setting up librsvg2-common:i386 (2.48.9-1ubuntu0.20.04.1) ... Setting up libavcodec58:i386 (7:4.2.4-1ubuntu0.1) ... Setting up libfaudio0:i386 (20.04-2) ... Setting up wine-stable-i386:i386 (6.0.2~focal-1) ... Setting up wine-stable (6.0.2~focal-1) ... Setting up winehq-stable (6.0.2~focal-1) ... Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.40.0+dfsg-3ubuntu0.2) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for libgdk-pixbuf2.0-0:i386 (2.40.0+dfsg-3ubuntu0.2) ...
Install Wine development version
To install the development version run the following command
$ sudo apt install --install-recommends winehq-devel
Install Wine staging version
To install the staging version run the following command
$ sudo apt install --install-recommends winehq-staging
6. Configure wine
To configure wine run the following command, it will install gecko and mono into our system.
You can also check the version you have installed with the following command. The command is for the staging version.
$ wine --version wine-7.0-rc4 (Staging)
We have successfully installed Wine 7 into our Ubuntu 20.04. I am happy you have known how to install it.