Debian

How to Install Wine on Debian 10

How to Install Wine on Debian 10

Today there are thousands of projects that cannot run in every environment. But what if you want to run Windows applications on the Linux environment? How would you manage to do that? Or for running a Windows application will require a separate virtual machine that will not work efficiently. In this case, the virtual machine may not utilize the full power of your machine, then what will be the solution for this problem?

Well, you do not have to worry about the solution to this problem of system compatibility. Wine comes into the picture to run or use the Windows applications or software on Linux for resolving this. If you have not heard about ther term Wine, this is the perfect guide for you to enlighten yourself about Wine and its features.

What is Wine?

Wine is a free, open-source program that allows Linux users for running Windows-based applications or software on any Unix environment. In addition, it acts as a compatibility layer to install all versions of the Windows program. Wine stands for “Wine Is Not an Emulator” which enables you to run Windows applications and games to run on Linux systems. Wine majorly focuses on Windows API calls and then translates them to Portable OS Interface calls.

Wine has announced its latest stable release, Wine 6.0, far bigger than its previous release. In addition, it has various enhancements than previous and provides bug fixes for 40 errors. The major highlights for this release include the core modules in PE format (NTDLL, KERNEL32, GDI32, and USER32), a Vulkan backend for WineD3D, DirectShow and Media Foundation support, and many more.

Benefits of Using Wine

Wine is mainly preferred over other emulators and virtual machines due to the following benefits.

  • With Wine, you can leverage all the Unix benefits like stability, flexibility, and remote administration while you use the Windows applications.
  • With Wine, you can call Windows applications using the Unix scripts leveraging the Unix environment.
  • You can use the Windows applications remotely irrespective of the distance.
  • You can easily use the thin clients by installing the Wine on the Linux server and accessing the Windows application from the X terminal.
  • You can easily extend the Wine accordingly as per the business needs.

How to Install Wine on Debian 10

There are a few ways to install Wine software on Debian 10. First, we will look at how to install Wine using GUI and from the command line interface.

Install Wine via Debian UI

If you do not want to worry about various command-line commands, using the Debian UI to install Wine is the perfect way to get started. You can follow the below simple and easy-going steps.

First, open the Debian desktop Activities toolbar.

From there, click the Debian software icon.

Now, you will get the below screen. Search for the Wine software from the search bar at the top. Apart from this, you will also get a list of software recommended.

The Debian stable main repository maintains the below available Wine software. Click the below Wine icon to get started.

Now, click the install option. Once you click, you will get an authentication box to provide credentials to use Wine. You should be an authorized user to install software from Debian.

Now, enter the password and click authenticate to start the installation process.

On completing the installation process, you will get the below screen with complete details.

Install Wine Using the Command-Line

For installing Wine, first, check the version of Wine available for 32 and 64-bit versions of Debian. But, first, check the Debian version so you can install the right Wine version. For this, launch the terminal from the Application launcher, as shown below.

Run the below command for checking the CPU details from files.

$ lscpu

Once you run the command, you will get the below output.

Using the details mentioned above, you can check the Wine version that is required to install.
Now follow the below simple steps for installing Wine.

It is highly recommended and preferred to install Wine from the standard Debian repository to get the most stable versions on your system. As we are using the 64-bit Debian version, we can run the below command (as root user) to install Wine.

$ sudo apt-get update

After running the above command, you can proceed with running the following command.

$ sudo apt-get install wine64

In the end, you will be asked to enter (y/n). Then, enter y to proceed. After this, the Wine installation will be started.

If you are using a 32-bit Debian system, run the following command:

$ sudo apt-get install wine32

Verify the version of Wine by running the following command:

$ wine –version

Install Wine using WineHQ Repository

The WineHQ repository contains standard packages for Wine to download and install. In addition, follow the below simple steps to install Wine.

Before you install the 64-bit version of Wine, run the below command to add the i386 architecture in the terminal.

$ sudo dpkg --add-architecture i386

After adding the architecture, run the below command to add the WineHQ signing key.

$ wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -

Next, run the below command to add the relevant repository available from the WineHQ.

$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/debian/ buster main'

After that, run the below command to update.

$ sudo apt-get update

Now, choose a release for installing Wine, either a stable version or a development version.

WineHQ Stable version is the latest stable release of Wine. To install the stable version, run the below command in the Debian 10 terminal.

$ sudo apt-get install --install-recommends winehq-stable

In the end, you will get the (y/n) option to enter. Press y to start the installation.

WineHQ development is the most recent version but might not be the stable version. To continue with the installation of this version, run the below command in the Debian 10 terminal.

$ sudo apt-get install --install-recommends winehq-devel

In the end, you will get the (y/n) option to continue further with the installation process. Press y to start the installation.

After the installation process, check the installed version using the below command.

$ wine --version

Uninstall Wine

You can run the below command to uninstall the Wine from the Debian system.

$ sudo apt-get purge winehq-stable

If you want to remove the installation completed, then run the below set of commands one by one, as shown below.

rm ~/.config/wine/ -rf
rm -rf $HOME/.wine
rm -f $HOME/.config/menus/applications-merged/wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/wine*
rm -f $HOME/.local/share/icons/????_*.xpm

Now, Wine is completely removed from your system.

Conclusion

Wine software will remove all your doubts while selecting any environment for your projects. For example, with Wine, you can easily run a Windows-based application on the Linux environment. Moreover, it will give you various features and components, making the task easier. Also, installing Wine on your Debian system is very simple and can be carried out by running a few simple commands.

In this article, we have guided you through a simple set of steps for installing Wine on the Debian 10 system.

About the author

Simran Kaur

Simran works as a technical writer. The graduate in MS Computer Science from the well known CS hub, aka Silicon Valley, is also an editor of the website. She enjoys writing about any tech topic, including programming, algorithms, cloud, data science, and AI. Travelling, sketching, and gardening are the hobbies that interest her.