When it comes to installing Windows applications on Linux, there’s no application that does it better than Wine. Wine is a compatibility layer that enables users to run Windows applications on POSIX compliant operating systems such as Linux and UNIX derivatives such as BSD, FreeBSD, and macOS.
Not all Windows applications are supported, and to get a comprehensive list of all supported applications, head over to the Wine application database – AppDB.
[ You might also like: How to Install Wine in Ubuntu Desktop ]
At the time of publishing this guide, the latest version of Wine is Wine 7.2, which is a development release. The latest stable release is Wine 7.0 Without further ado, let’s switch gears and install Wine on Debian desktops.
Installing Wine in Debian Linux
Straight off the bat, log into your system and update the package index as a sudo user.
$ sudo apt update
A few dependencies are required for the installation of Wine to go through smoothly.
$ sudo apt install software-properties-common gnupg2
With your system up to date and prerequisites installed, proceed to the next step.
Next, you need to enable 32-bit architecture on the Debian system to seamlessly run 32-bit applications with Wine.
$ sudo dpkg --add-architecture i386
There are two approaches to installing Wine. You can install Wine from the Debian repository using the APT package manager, which is simple and straightforward and all you need is to run the command:
$ sudo apt install wine
However, this will give you an older version of Wine than the one in the WineHQ repository. Therefore, to install the latest Wine version, it’s recommended to install it from the WineHQ repository.
$ wget -nc https://dl.winehq.org/wine-builds/winehq.key $ sudo apt-key add winehq.key
Once you have successfully added the GPG keys, proceed and add the WineHQ repository to your system.
$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main'
Then update the package lists to notify Debian about the newly added Wine repository and start using it.
$ sudo apt update
To install the latest stable version of Wine, run the command
$ sudo apt install --install-recommends winehq-stable
This will give you Wine 7.0.
Alternatively, you can install the development branch which provides the most recent version – Wine 7.2.
$ sudo apt install --install-recommends winehq-devel
The installation is quite heavy as it involves the installation of hundreds of packages and dependencies. In my case, this came to about 1.7GB and took roughly 15min. At this point, you can take a much-needed break as the installation of Wine goes on.
Once installed, verify the Wine version as follows.
$ wine --version wine-7.2
Configuring Wine on Debian Linux
So far, we have successfully installed Wine on Debian. However, some post-installation steps are required before Wine is ready to install Windows Apps.
To configure Wine, run the command:
$ winecfg
This creates a hidden directory in the home directory called .wine
that contains a “virtual” drive C that contains directories that you would find on a Windows system such as Program Files, Program Files, Program Files (x86), users, and Windows.
On the next pop-up, click ‘Install‘ to install the wine-mono package which is a prerequisite for .NET applications.
The installation will get underway. This takes a minute or two.
Finally, you will see the Wine configuration window as shown. You should be good to go with the default settings, but feel free to adjust the settings to your own preference.
Installing Windows Application with Wine in Debian
Now, let us see how you can install a Windows App using Wine. To demonstrate this, we will install a VLC media player which is a free and open-source cross-platform media player.
So, head over to the official VLC download page and download the executable file. Once downloaded, right-click on select ‘Open with other application’.
On the pop-up that appears, select ‘Wine Windows Program Loader‘.
Once again, right-click on the installer and select ‘Open with Wine Windows Program Loader‘. The VLC media installation wizard will open. Click ‘Ok’ to start the installation and follow along right till the end.
Inside the .wine
folder, navigate to the ‘Virtual’ drive_c folder and then the ‘Program Files’ folder. Here you will see a directory for the just installed VLC multimedia application.
This wraps up this guide. In this tutorial, we have demonstrated how to install Wine on Debian Linux. We went a step further and showed you how you can run and install a Windows application with Wine in Debian.