Platform-specific applications often require compatibility software to run on another operating system. Wine is also a compatibility software that helps users run Windows-based applications on other operating systems like Linux platforms and macOS etc. This software has no limitations and allows an easy integration of Windows operating system on other platforms. In this tutorial, we will go through the method of installation of Wine on the Ubuntu 20.04 system. Users can easily follow this method to use Wine on their systems.
- Recommended OS: Ubuntu 20.04
- User account: A user account with sudo rights
Method of Installation of Wine on Ubuntu 20.04
To install Wine on your Ubuntu 20.04 system, follow the steps given below:
Step # 01: Check the installed architecture
To install Wine, users need to check computer architecture to fulfill the software requirements. So, the first step is to check the architecture of the computer system. Open up the terminal using the Ctl+Alt+T shortcut or go to the ApplicationsTerminal in your Ubuntu system. Once opened, you need to type the following command in the command-line.
$ dpkg --print-architecture
The output should display the architecture amd64 as shown in the figure below:
In case if your system has 64-bit architecture enabled, then you will need to enable 32-bit architecture as well to meet the requirements of the software. Run the following command to do so:
$ dpkg --print-foreign-architectures
This command should respond with “i386” output. If i386 is not displayed in the output then users need to type the following command in their terminal window:
$ sudo dpkg –add-architecture i386
The system might ask for the password of the sudo user. Provide the password of the logged-in user to proceed with the enablement and press the <enter> key.
Once you have enabled the architecture, you can check the status of installation by using:
$ dpkg –print-foreign-architectures
The output like this will show that the required architecture is now enabled.
Step # 02: Get and Install the WineHQ Ubuntu repository
To get the WineHQ, install all dependencies needed for Ubuntu 20.04. Use the following command:
$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
To install the package run the following command.
$ sudo apt-key add winehq.key
An OK in the output means that WineHQ repository key is installed in your computer system.
Step # 03: Download and Install Repository Key
Now you need to download and install the WineHQ repository using the following command:
$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
Step # 04: Update database package
After that, you need to update the package database. It can be done by using:
The package will begin to update as shown in the figure below:
Step # 05: Install Wine
Here we will install Wine Stable in Ubuntu 20.04. To do so, use the following command.
$ sudo apt install --install-recommends winehq-stable
Users can either use Wine Development or Wine Staging by simply replacing winehq-stable with winehq-devel or with winehq-staging in the above-mentioned command.
The installation of Wine will begin as shown in the figure below. The system will ask for your confirmation after some time. Type Y to proceed with the installation process.
Verification of Wine
To verify the installation of Wine in your system, simply type the following command in the terminal window:
$ wine --version
Output like this one shown in the above figure will confirm the Wine installation.
To uninstall Wine, simply go to the command line and type the following:
$ sudo apt-get purge winehq-stable
Once you press the <enter> key, the system will ask for the password of the sudo user. Provide the password to proceed with the uninstallation of Wine. Once done, hit <enter> key.
After that, enter Y and press <enter> to confirm your selection. The uninstallation process will begin.
The directories and the WineHQ-stable package will be removed from the Ubuntu 20.04 system.
The uninstallation will be completed by following this method.
In this tutorial, we went through the method of installation of Wine on Ubuntu 20.04. We used the WineHQ repositories and downloaded them directly for their installation. Users can use it now for running all Windows-based applications. In the tutorial, we also discussed the process of uninstallation of Wine.
Bushra is a technical writer with expertise in transforming complex Linux concepts into easy-to-comprehend how-tos and tutorials. She has experience in using Sphinx, Postman, MS Office suite, Jira, Latex, Draw.io, MS Visio, Bitbucket, Sublime Text editor, and Notepad++ tools.