Wine which stands for “Wine Is Not an Emulator” is an application layer that allows the users to run Windows software on Linux. However, its compatibility of it is not 100 percent for every application out there meant specifically for Windows. Yet, it is quite effective and from time to time many users use it where they need any software which is not available for Linux.
WineHQ is not only meant for Linux but also for other operating systems such as macOS and BSD can have its benefits. As I mentioned above it is not an Emulator instead it uses API conversion technology to make Linux corresponding to Windows corresponding functions to call DLL (Dynamic Link Library) to run Windows programs. Wine releases are completely open-source.
Enable 32-bit architecture
It still supports 32-bit architecture as many old applications don’t work on 64-bit. Thus, if your system is 64-bit, first enable the 32-bit architecture support using the below command:
sudo dpkg --add-architecture i386
Add Wine repository key
This is an important step as if you don’t add the repo key, while installation an error will appear. The downloading and adding of the Key will ensure, that the packages we receive will be from source.
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
Get the WineHQ repository
- Ubuntu 20.04
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
- Ubuntu 19.10
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'
- Ubuntu 18.04 or Linux Mint 19.x
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
- Ubuntu 16.04 or Linux Mint 18.x
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
Run system update command
To let the system know about the added repository and make it rebuild the APT cache, run the system update command:
sudo apt update
Install Wine on Ubuntu
This step will be common for all the operating systems running on this Linux. You can install the Wine as per your requirement from different branches.
- Stable branch
sudo apt install --install-recommends winehq-stable
- Development branch
sudo apt install --install-recommends winehq-devel
- Staging branch
sudo apt install --install-recommends winehq-staging
To check the version of this Windows software installer on Linux run:
Configure Wine environment for Windows applications you can set it to 64-bit as well as 32-bit according to the software you want to install. Here we are setting it to 32-bit.
The winecfg command will open the Wine Configuration window, however, it would say “Wine could not find wine-mono packages” then allow it to install that along with others. Because we need these packages for .NET framework-based applications.
Select the Windows version which you default on your Linux system from the dropdown box. Graphics, themes, screen resolution, and more…
To install any Windows Application on Linux using the WINE. Just navigate to that directory-> Open the command terminal there and run:
Note: Replace the setupfilename.exe with the executable file of that Windows software you want to install. Here I have successfully installed Adobe Acrobat on my Ubuntu system using the WINE open source.
Remove Installed Apps
In case you want to uninstall the installed Windows applications using Wine, then simply go to All applications and search for uninstall. You will get the option to remove the apps for each installed program.
For stable installation:
sudo apt remove winehq-stable
sudo apt remove winehq-devel
sudo apt remove winehq-staging
After that delete the wine folder created under your home directory:
rm -rf ~/.wine
In this way, we can enable the Wine repository to install on Ubuntu Linux systems.