All operating systems have their plus and negative aspects. One of the plus points of Windows OS is the availability of a huge library of apps. But what if you are a Linux user who wants to use the Windows apps on your Linux system? Don’t worry because all Linux distributions including the Debian can run most of the Windows application programs using the “Wine” application.

Wine” is a free-to-use and open-source application allowing users to run Windows apps on Linux. It is user-driven and is always improving. The “Wine” is not an emulator or a virtual machine, but a translation layer that uses internal implementation and native libraries to run the Windows apps on Linux.

Installing the “Wine” on Debian 12 requires a few commands to run, and this guide sheds light on them.

Quick Outline

Let’s begin!

How to Install Wine on Debian 12 From the Official Sources?

To install the “Wine” on Debian 12, users must run a series of commands illustrated in the below steps:

Step 1: Add i386 Architecture

The “i386 Architecture” enables the Debian 12 to access and run the “32-bit Applications”. To install it, run the “dpkg” command like below:

sudo dpkg --add-architecture i386

Step 2: Import Wine GPG Key

The “GPG Key” digitally signs the files and authenticates them. To install the “Wine” on Debian 12, users must download and store its “GPG” key in a separate directory. 

To import the “Wine GPG Key” in the “/etc/apt/keyrings” directory(it already exists), use the below-stated command:

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

Step 3: Add Wine Repository

After importing the “GPG Key” for Wine, add its repository using the below command:

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources

Now update the system’s packages to conclude the Wine repository’s addition:

sudo apt update

Step 4: Install Wine on Debian 12

To install the latest “Wine” version on Debian 12, run the “apt install” command as seen below:

sudo apt install --install-recommends winehq-stable -y

To confirm the “Wine” installation, check its version:

wine --version

How to Install Wine Using the Source Code on Debian 12?

The process of installing the “wine” using the source code requires a considerable amount of time. However, it is worth waiting because when installed using the “apt”, users get the latest version late compared to the ones who install the software by compiling the code. 

To install the “wine” using the source code on Debian 12, follow these steps:

Step 1: Download the “tar.xz” File

The “.targz” is a popular file compressing format used by developers to distribute their applications. It can also include the source code. To download the “wine 9.0”, use the below command:

wget https://dl.winehq.org/wine/source/9.0/wine-9.0.tar.xz

Step 2: Extract the Wine “.tarxz” File

Now, extract the “wine-9.0.tarxz” file by executing the below command:

tar -xvf wine-9.0.tar.xz

After that, run the following command to navigate into the extracted directory:

cd wine-9.0/

Step 3: Install the Wine Using the Source Code

From here, run the below mentioned commands to install the “Wine” using the source code:

sudo ./configure #For 32-bit
sudo ./configure --enable-win64   #For 64-bit
sudo make && sudo make install

While compiling the source code of “Wine 9.0”, users can face a few dependency errors, which can be fixed using:

sudo apt install xorg-dev libx11-dev

Features of Wine Version 9.0

The “9.0” is the latest version of “Wine” and it comes with the following improvements:

  1. Improved graphics and 3D rendering using the GdiPlus functions.
  2. Enhanced Direct 3D performance.
  3. Added the experimental Wayland graphics drier to include multi-monitor support, high-DPI scaling, Vulkan support and other features.
  4. Added support for ARM64 that allows running the existing Windows libraries on ARM64 processors.

How to Use the Wine on Debian 12?

Before using “Wine” on any Linux distribution including Debian 12, users must have a Wine-compatible app. The winehq.org hosts several Windows apps that are Wine-compatible; find the required application from here, go to its URL and download it. 

Below is the snippet of downloading the Notepad++ app on the Debian 12:

Next, run the “wine” with the full path to the application to install and it triggers the installation process; follow the on-screen installation steps to install the app, just like Windows:

cd Downloads
ls
wine npp.8.6.2.Installer.x64.exe

After successfully installing the application, the following message appears on the screen:

To launch the application installed using “Wine”, run the below command and replace “notepad++” with the application you installed:

wine notepad++

Note: Wine on Debian 12 also supports the “.msi” file extension. To use it, run the below command:

wine msiexec /i app_name/path.msi

How to Uninstall Wine Applications on Debian 12?

Users cannot uninstall the applications installed with “Wine” using the conventional “apt remove” command. To remove the applications installed using the “Wine”, users must use the “Wine uninstaller”. It comes installed with the Wine. To launch it, run the below command and it opens a new window:

wine uninstaller

Now select the application, and then hit the “Support Information” button to get more information about the application. Hit the “Modify/Remove” button to trigger the uninstallation process:

From here, follow the on-screen instructions to remove/uninstall the application:

Note: Using the “wine uninstaller” command, users can install the applications as well. To do it, use the “Install” button, navigate to the “.exe” or “.msi” file and hit the “Open” button to trigger the installation process:

How to Configure Wine on Debian 12?

Wine allows the users to configure Drivers, Audio, Applications, Libraries, Graphics, and Desktop Integration. Use the below command to trigger the “Wine Configuration” window:

winecfg

How to Uninstall Wine on Debian 12?

To “Uninstall Wine on Debian 12”, run the following command:

sudo apt --purge autoremove winehq-stable -y

To remove the “Wine Repository”, use the following command to list the contents of “/etc/apt/sources.list.d” and to remove:

ls /etc/apt/sources.list.d
sudo rm /etc/sources.list.d/winehq-bookworm.sources

Here,

  • The “ls” command lists the contents of the “/etc/apt/sources.list.d” directory.
  • The “rm” command deletes/removes the “/etc/sources.list.d/winehq-bookworm.sources” file.

Bonus Tip: How to Install Winegui on Debian 12?

The “Winegui” is the GUI version of the Wine application that offers loads of features. Users can use the Window’s notepad editor, File Explorer, Command Prompt and the Task Manager with basic functionalities. It also enables the users to install the Windows applications on Debian 12 as well:

To install the “Winegui” on Debian 12, navigate to the official gitlab page and download the .deb package:

It will start downloading and once it is complete, use the following commands to navigate to the Downloads folder and list files:

cd Downloads
ls

Now, use the below-stated command to install the WineGUI-v2.3.0.deb:

sudo dpkg -i WineGUI-v2.3.0.deb

After installing the “WineGUI”, run it using the “winegui” command or from the Activities:

That’s all for installing and using the Wine on Debian 12.

Final Words

The “Wine” is a useful package for Linux OS to enable the users to enjoy several Windows applications on their favorite Linux Distributions. It is open-source and is continuously improved for a smooth user experience.

To install the “Wine on Debian 12”, add the 32-bit architecture. Next import the Wine GPT key using “sudo mkdir -pm755 /etc/apt/keyrings” and import its repository using “sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources”. Now update the system’s packages and run “sudo apt install –install-recommends winehq-stable -y” to install it.The “Wine” also comes in a GUI version. It is named “winegui” whose installation is illustrated in this detailed guide to install the “Wine on Debian 12”. This guide has discussed the process to install and use Wine on Debian 12.