How to Install & Configure Wine (WineHQ) on Pop!_OS 20.04

Wine is an open-source compatibility layer that allows you to run Windows applications on Unix-like operating systems like Linux, FreeBSD, and macOS. It is an interface that translates Windows system calls into equivalent POSIX calls used by Linux and other Unix-based operating systems.

For Linux users, Wine is a savior when running Windows-based applications on UNIX systems. However, not all Windows applications will run in Wine and may have strange crashes or bugs. The Wine AppDB is a database containing a list of applications that have been tested and confirmed to work under Wine.

Examples of Wine benefits over Windows:

  • Wine makes it possible to take advantage of all the Unix strong points (stability, flexibility, remote administration) while still using the Windows applications you depend on.
  • Unix has always made it possible to write powerful scripts. Wine makes it possible to call Windows applications from scripts that can also leverage the Unix environment to its full extent.
  • Wine makes it possible to access Windows applications remotely, even if they are a few thousand miles away.
  • Wine makes it economical to use thin clients: install Wine on a Linux server, and voila, you can access these Windows applications from any X terminal.
  • Wine can also be used to make existing Windows applications available on the Web using VNC and its Java/HTML5 client.
  • Wine is Open Source Software, so you can extend it to suit your needs or have one of many companies do it for you.

At the end of the tutorial, you will learn how to install and configure Wine on your Pop!_OS 20.04 desktop.

Prerequisites

  • Recommended OS: Pop!_OS 20.04 or higher.
  • User account: A user account with sudo or root access.
  • Optional Packages Required: wget

Update Operating System

Update your Pop!_OS 20.04 operating system to make sure all existing packages are up to date:

sudo apt update && sudo apt upgrade

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:

sudo whoami

Example output showing sudo status:

[joshua@popos ~]$ sudo whoami
root

To set up an existing or new sudo account, visit our tutorial on adding a User to Sudoers on Pop!_OS 20.04.

To use the root account, use the following command with the root password to log in.

su

Advertisement


Check if Pop!_OS 20.04 if 32-bit or 64-bit

The first step is to identify if your system is 32-bit or 64-bit correctly. To do this, run the lscpu command:

lscpu

Example output:

How to Install & Configure Wine on Pop!_OS 20.04

Install Wine from APT Repository

Install Architecture

The first step is the add the i386 architecture.

sudo dpkg --add-architecture i386

Now that you know which version of Wine to install, you can install the latest and most stable version of Wine from Pop!_OS’s (Ubuntu) repository.

For 32bit Only:

sudo apt-get update && sudo apt install wine32 -y

For 32bit & 64bit:

sudo apt-get update && sudo apt install wine32 wine64 -y

You can confirm your Wine version to verify installation and build using the following command:

wine --version

Example output:

wine-5.0 (Ubuntu 5.0-3ubuntu1)

Note, installing Wine from the default repository will always be a much older version than what is current from WineHQ.


Advertisement


Install Wine from WineHQ Repository

To use the latest up-to-date versions from Wine, you will need to use their repository to install or update. Wine is under constant development with multiple releases sometimes each month for improvements, bug fixes, and security fixes.

To install, follow the steps below:

Install Architecture

The first step is the add the i386 architecture.

sudo dpkg --add-architecture i386

Import the GPG Key

The first step in installing the latest Wine build is to import the GPG key:

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

If downloaded and imported successfully, you should get the output:

OK

Import the Repository

Next, install the dependency software-properties-common and import the Wine build.

sudo apt install software-properties-common && sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

Install Wine

Now that you have imported the GPG key and the official repository, proceed to install Wine using the following command:

sudo apt update
sudo apt install --install-recommends winehq-stable

Example output of a large list to be installed:s

How to Install & Configure Wine on Pop!_OS 20.04

Type Y, then press the ENTER KEY to proceed with the installation.

Or if you prefer to install the development branch use the following:

sudo apt install --install-recommends winehq-devel

Example output:

How to Install & Configure Wine on Pop!_OS 20.04

Type Y, then press the ENTER KEY to proceed with the installation.

Note, the WineHQ Development branch is the most recent version of Wine from the developers. It can often be unstable and should only be installed by developers and not the average user unless you want to live on the edge.

Lastly, verify your Wine version:

wine --version

You should get the following output (EXAMPLE ONLY):

wine-6.18

Post Installation & Configuring

To start Wine, run the command winecfg from your terminal. This command will proceed to install Mono and Gecko and sets the Wine environment.

Example:

How to Install & Configure Wine on Pop!_OS 20.04

Press Install to proceed from Mono to Gecko Installer.

Once you have finished, the Wine configuration dialogue will be shown. In this section of the software, you can configure various Wine settings.

The default settings should be sufficient in most cases with Windows 7 being selected. However, for example you can change the Windows version to Windows 10.

Example of configuration window:

How to Install & Configure Wine on Pop!_OS 20.04

Once finished, close the dialogue box by clicking the OK button.


Advertisement


Example of using Wine to Install Windows App

In a brief example, we will use Wine to install the chat application Notepad++.

First, visit the download page and select the Windows Version .exe package.

Windows x64 version link:

wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.5/npp.8.1.5.Installer.x64.exe

Once you have downloaded the Windows version of Notepad++, navigate to your Downloads directory or the location where you store downloaded files and run the following terminal command:

wine ./npp.8.1.5.Installer.x64.exe

Next, you will see the first set-up box appear for the installation.

How to Install & Configure Wine on Pop!_OS 20.04

Select your language, then click the OK button.

The next screen is a brief information message about the recommendations from Notepad++ on the installation. Click the Next > button to begin the installation.

How to Install & Configure Wine on Pop!_OS 20.04

Notepad++ License Agreement, click I Agree to continue.

How to Install & Configure Wine on Pop!_OS 20.04

Next is the default installs path. As you can see, it has a default install path similar to Windows, C:\users\linuxcapable\Application Data\Notepad++. Desktop. Windows applications are installed in most Linux-based systems in the ~/.wine/drive_c/ directory.

For most users, leave as default, and click the Next > button to proceed with the installation.

How to Install & Configure Wine on Pop!_OS 20.04

Choose the type of installation standard or custom and make necessary adjustments. Once done, click the Next > button to proceed.

How to Install & Configure Wine on Pop!_OS 20.04

Create a shortcut icon, select it or not, then click on the Install button to proceed with the installation.

How to Install & Configure Wine on Pop!_OS 20.04

Once complete, the success installation screen will appear; click the Finish button to open up Notepad++.

Congratulations, you installed Notepad++ using Wine.

Example:

How to Install & Configure Wine on Pop!_OS 20.04

Note, if you have issues installing any applications, always use stable versions first before development branches.

How to Remove (Uninstall) Wine

Depending on what option you choose how to install Wine, some of the methods to remove are:

Remove Wine 32-bit:

sudo apt autoremove wine32 --purge

Remove Wine 64-bit:

sudo apt autoremove wine64 --purge

Remove WineHQ Stable:

sudo apt autoremove --install-recommends winehq-stable --purge

Remove WineHQ Development:

sudo apt autoremove --install-recommends winehq-devel --purge

Advertisement


Comments and Conclusion

In the guide, you have now learned how to install Wine, including a demonstration of installing a Windows .exe application using Wine on your Pop!_OS-based operating system. Overall, Wine is an excellent program with some real benefits combining Windows and Linux for the user.

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x