How to Install Wine 7 on Debian 11 Bullseye

Wine is a program that allows you to run Windows applications on Unix-like operating systems. Wine translates system calls made by your favorite programs into POSIX ones, used in similar ways across different OSs like Linux and macOS alike!

Wine 7 is the newest major release; moving from the version 6 era with Portable Executable (PE) format helps Wine feel/behave closer to an actual Windows installation being the major talk in this release.

Debian 11 users can now install the latest Wine version by importing the WineHQ repository and installing either the stable or development branch.

Update Debian

Before proceeding, you should ideally make sure your system is up-to-date to avoid any issues during the tutorial.

sudo apt update && sudo apt upgrade -y

Import WineHQ Repository

The first step is to import the GPG key and WineHQ repository. In your terminal, use the following command to import the GPG key.

sudo wget -O- https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor | sudo tee /usr/share/keyrings/winehq.gpg

With the GPG imported and the key located in the common /usr/share/keyrings location, import the repository as follows.

echo deb [signed-by=/usr/share/keyrings/winehq.gpg] https://dl.winehq.org/wine-builds/debian/ bullseye main | sudo tee /etc/apt/sources.list.d/winehq-repo.list

Lastly, run an APT update to reflect the new addition to your APT sources list.

sudo apt-get update

Install Wine 7

With the official repository now imported, you can install the latest version of Wine. Before you proceed further, users who would like 32bit support should enable it now.

sudo dpkg --add-architecture i386

This should always be enabled if you stumble across an application that requires it.

Next, you can install either the stable branch or development as follows.

Only install one version at a time.

Install Wine Stable Release:

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

Confirm the installation and build.

wine --version

Example output:

How to Install Wine 7 on Debian 11 Bullseye

Install Wine Development Release:

sudo apt install --install-recommends winehq-devel -y

Confirm the installation and build.

wine --version

Example output:

How to Install Wine 7 on Debian 11 Bullseye

At the time of the tutorial, the Wine stable was 7, and the development as above is 7.3, but this will change in time.

How to Run Wine 7

While you can right-click applications downloaded and select open with wine, you can use the following command for strictly terminal terms.

wine PROGRAM [ARGUMENTS...]   Run the specified program

How to Update/Upgrade Wine 7

For future updates from WineHQ, this can be done using the APT update and APT upgrade command as follows.

sudo apt upgrade && sudo apt update

How to Remove Wine 7

Depending on your needs, you may need to remove a particular version of Wine to install another or remove it in full. Use one of the corresponding commands to match your version.

Remove Wine Stable Release

sudo apt autoremove winehq-stable -y

Remove Wine Development Release

sudo apt autoremove winehq-devel -y

For complete removal, delete the repository file.

sudo rm /etc/apt/sources.list.d/winehq-repo.list

If you have removed the WineHQ repository, it is recommended to remove the GPG key.

sudo rm /usr/share/keyrings/winehq.gpg

Comments and Conclusion

In the tutorial, you have learned how to securely import the WineHQ repository and install either stable or development release of Wine 7 on Debian 11 Bullseye.

The official announcement with a complete list of changes can be found on their official press release.



Follow LinuxCapable.com!

Like to get automatic updates? Follow us on one of our social media accounts!