How to install Wine on Ubuntu 19.10/18.04/16.04 LTS

In this article , How to Install Wine on Ubuntu 19.10/18.04/16.04 LTS or any other cloud platform like Amazon EC2, Azure VM, Google Compute Engine, etc.

Introduction

Wine(Wine is not an Emulator) is free and open source used for running Windows applications on UNIX like operating system such as Linux, mac-OS, & BSD.

Prerequisites

  • Ubuntu 19.10/18.04/16.04 LTS
  • SSH access with sudo privileges.

Step 1: Check Ubuntu OS-version

Use the below command to check the OS version.

$ cat /etc/os-release

Optput:

NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Step 2: Enable 32 bit architecture

If your OS is 64 bit, enable 32 bit architecture :

$ sudo dpkg --add-architecture i386

Download and Import Wine public GPG repository key:

$ wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

Optput:

OK

Step 3: Add Wine public GPG repository key for Ubuntu

Different OS-Version Wine public GPG repository key:

Ubuntu 19.10   

 $ sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'

Ubuntu 16.04

$ sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'

Ubuntu 18.04 

$ sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
$ sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport

Update the system packages.

$ sudo apt update

Step 4: Install stable Wine on Ubuntu

Install Wine on Ubuntu:

$ sudo apt install --install-recommends winehq-stable

Output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
grub-pc-bin libegl-mesa0 libegl1 libgbm1 libwayland-egl1-mesa libwayland-server0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
.
.
.
.
Setting up gstreamer1.0-plugins-base:i386 (1.14.5-0ubuntu1~18.04.1) ...
Setting up libpangocairo-1.0-0:i386 (1.40.14-1ubuntu0.1) ...
Setting up librsvg2-2:i386 (2.40.20-2) ...
Setting up librsvg2-common:i386 (2.40.20-2) ...
Setting up libavcodec58:i386 (7:4.1.3-0ppa1~18.04) ...
Setting up libfaudio0:i386 (20.03-bionic~1ppa1) ...
Setting up wine-stable-i386:i386 (5.0.0~bionic) ...
Setting up wine-stable (5.0.0~bionic) ...
Setting up winehq-stable (5.0.0~bionic) ...
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.36.11-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for libgdk-pixbuf2.0-0:i386 (2.36.11-2) ...

Step 5: Check wine Version

To check the the version of Wine.

$ wine --version

Output:

wine-5.0

Uninstall Wine from Ubuntu

To uninstall or remove wine completely from ubuntu, Run below command,

$ sudo apt-get remove --autoremove wine-stable winehq-stable

Conclusion

In this article we have performed how to install Wine on Ubuntu, checked installed wine version.

Related Articles

How to Configure Sendmail to Relay Emails using Gmail SMTP on Ubuntu 18.04/16.04 LTS

Reference

https://wiki.winehq.org/Ubuntu

Sivasai Sagar

I am working as DevOps Engineer and having 5 years of Experience. Likes to share knowledge.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Shares
Share via
Copy link