Wine is a software application that allows us to use Window based applications on Linux. It works like a compatibility layer and translates the windows application to Linux specific language. The wine's latest stable release can be installed on Ubuntu 20.04 from standard and official wine repositories. As of the drafting of this post, the latest stable release of Wine is 5.0.3.
Installing wine on Ubuntu 20.04 from the standard repository
The Wine is included in the Ubuntu 20.04 standard repository and can be installed with the apt command. It is the suggested way to install wine on Ubuntu 20.04 because the standard repository maintains the stable version of wine.
Before installing the wine on Ubuntu 20.04, enable the multi-architecture with the below-given command as it is a pre-requisite of wine installation:
$ sudo dpkg --add-architecture i386
Next, update the apt cache with the command:
$ sudo apt update
Now, write the below-given command on the command line to install the wine stable version:
$ sudo apt install wine64 wine32
The wine stable version includes all the required dependencies and libraries import to use wine on Ubuntu 20.04.
Press 'y' to continue installing wine.
Once the wine is installed, verify the installed version with the command:
$ wine --version
Installing Wine on Ubuntu 20.04 from the official Wine repositories
The WineHQ is the official wine repository. To install wine from the official wine repositories, first enable the multi-architecture support using the command:
$ sudo dpkg --add-architecture i386
Next, download and add the Wine key with the command:
$ wget -O- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
Next, add the wine repository:
$ sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
Now, update the apt-cache:
$ sudo apt update
Next, we have to choose and install the WineHQ release. The WineHQ release offers the following three releases:
- WineHQ stable release
- WineHQ development release
- WineHQ staging release
WineHQ Stable: it is the latest and stable release of wine and can be installed with the command:
$ sudo apt-get install --install-recommends winehq-stable
WineHQ Development: The WineHQ development is the recent release of Wine and is not a stable release. This release is recommended for developers using the command:
$ sudo apt install --install-recommends winehq-devel
WineHQ Staging: The WineHQ staging is the testing version and can be installed with the command:
$ sudo apt install --install-recommends winehq-staging
After the installation, check the installed version with the command:
Configure Wine
After successfully installing wine, perform the wine's initial configuration with the command:
$ winecnfg
Wine needs to install the Mono package. Click on 'Install'.
Wine needs to install the Gecko package. Click on 'Install'.
Choose Windows version and click 'Apply' and then 'OK'.
The wine will be configured.
Conclusion
We can install Wine on Ubuntu 20.04 from the standard repository and WineHQ official repository. The suggested way to install Wine on Ubuntu 20.04 is from the standard repository.