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.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Software Installation tasks on their Linux Server.
In this context, we shall look into how to install Wine on the Ubuntu 20.04 system.
How to install Wine on Ubuntu 20.04 ?
To begin, you need to log into your Server with the root account or user account with sudo rights.
Then once logged in, follow the steps given below:
1. 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 Applications Terminal in your Ubuntu system.
Once opened, you need to type the following command in the command-line:
$ dpkg --print-architecture
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 will show that the required architecture is now enabled.
2. 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
You will see an OK in the output which means that WineHQ repository key is installed in your computer system.
3. 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'
4. Update database package
After that, you need to update the package database. It can be done by using:
$ sudo apt update
5. 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.
The system will ask for your confirmation after some time. Type Y to proceed with the installation process.
How to verify installation of Wine ?
To verify the installation of Wine in your system, simply type the following command in the terminal window:
$ wine --version
This will display the version of Wine Installed on your Ubuntu System.
How to uninstall Wine from Ubuntu system?
i. To uninstall Wine, simply go to the command line and type the following:
$ sudo apt-get purge winehq-stable
ii. Once you press the <enter> key, the system will ask for the password of the sudo user.
iii. Provide the password to proceed with the uninstallation of Wine.
iv. Once done, hit <enter> key.
v. 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.
Finally, the uninstallation process will be completed.