How to Install Wine 7.0 (Stable) on Kali Linux 2022

In this article, we will examine how to set up and use Wine 7.0 to use programs or games running on Windows on a desktop or laptop computer running Kali Linux 2022 (2022.3) operating system.

How to Install Wine 7.0 (Stable) on Kali Linux 2022

How to Set Up Wine 7.0 to Run Windows Apps on Kali Linux 2022.3

When installing an application on a Windows-based PC, the setup file extension is usually EXE or MSI. These file extensions do not work on Linux systems for compatibility reasons. But you can try to install a widely used application such as Office or Photoshop on all Linux distributions via Wine.

Wine software is a layer developed by WineHQ that allows you to run Windows-compatible applications or games on a Linux system. You can run and use the software in the WineHQ database on your Linux computer.

If you have installed Kali Linux on your computer, you will already have alternatives to Windows-based applications, but if you need to use a Windows application for your job, you need to install WineHQ software.

How to Install WineHQ

Some incompatibility errors may occur when new versions of Wine software are released or when you update your Linux system. Before starting the installation of any program, we recommend that you back up your computer due to such problems.

   Step 1

In order to run WineHQ on your Kali Linux system, you must first download some necessary files from the website and copy them to the required locations. Also, if you are going to install a 32 Bit program instead of 64 Bit, you need to enable 32 Bit architecture in order to run these applications smoothly.

In your Kali system, open the terminal by pressing CTRL + ALT + T together and activate the 32 Bit architecture first and then download the WineHQ.key file and add it to /usr/share/keyrings/winehq-archive.key.

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo mv winehq.key /usr/share/keyrings/winehq-archive.key

Winehq Key Download

   Step 2

Since Kali distribution is based on Debian, you need to add winehq-bullseye.sources to your system. First, download the sources file to your computer via the wget command, and then add it to /etc/apt/sources.list.d/.

wget -nc https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources
sudo mv winehq-bullseye.sources /etc/apt/sources.list.d/

Downloading the Winehq-Bullseye.Sources File

   Step 3

After downloading winehq.key and sources and adding them to your system, we recommend that you add the Debian repository address so that some packages can be installed without problems.

To add the Debian Bullseye source to the Kali repository list, execute the below command in the terminal and then the “sudo apt update” command to check for new versions of available packages based on your system’s repository addresses.

echo "deb http://ftp.us.debian.org/debian bullseye main " | sudo tee -a /etc/apt/sources.list
sudo apt update

Adding and Updating a Repository Address

   Step 4

After refreshing the repository addresses, execute the “sudo apt install –install-recommends winehq-stable” command in the terminal to install the stable version of the Wine software.

sudo apt install --install-recommends winehq-stable

If you are getting the error below in the terminal at this stage, you need to install some additional packages manually. Otherwise, you will not be able to install the stable version of the Wine program.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
winehq-stable : Depends: wine-stable (= 7.0.0.0~bullseye-1)
E: Unable to correct problems, you have held broken packages.

To resolve the Unmet dependencies error, execute the command below in the terminal and confirm the installation of packages with a size of about 500 MB, and after installing the packages, run the WineHQ-Stable command again.

sudo apt install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386

Wine Stable Installation

   Step 5

When you try to install WineHQ again, this time you will be able to see the new packages to be installed. After checking the packages to be installed, press Y and Enter to confirm.

Confirming Packages to Install

   Step 6

After installing WineHQ, you can use “wine –version” and “winecfg” commands in the terminal to check its version and run it. When you run Wine, click the Install button in the Mono Installer window for the NET Framework applications to run smoothly.

wine --version
winecfg

Checking and Running the Wine Version

   Step 7

When Wine Configuration opens, you can check the version from the About section and change or configure the installation location of the programs from the Applications section.

About Wine

How to Install a Windows Application

After installing Wine on Kali Linux, the first thing you need to do is to download a commonly used Windows software and start using it on your Linux computer.

   Step 1

To download LightShot, a great screenshot program widely used in Windows and macOS systems, and install it on your Linux computer, execute the commands below in the order in the terminal.

cd ~/Downloads
wget https://app.prntscr.com/build/setup-lightshot.exe
wine ./setup-lightshot.exe

Downloading Lightshot Windows Program with Exe Extension

   Step 2

After starting the setup-lightshot.exe setup with Wine, the wizard will open just like in Windows systems. Select the language you want to use LightShot in and click OK.

Selecting Lightshot Language

   Step 3

After reading the license terms of the LightShot program, accept it and click Next.

Accepting the Lightshot License Agreement

   Step 4

After installing LightShot on your Kali Linux system, click the Finish button to close the installation wizard.

Closing the Lightshot Setup Wizard

   Step 5

When the LightShot program opens, you will see it running in the taskbar. By clicking on the program, you can open the screenshot capture area and save the image of the area you want.

Using Lightshot

   Step 6

Save the area you took the screenshot of on the desktop or any location, and after right-clicking on it, you can open the image you saved by clicking “Open With Ristretto Image Viewer” from the options that appear.

Opening Screenshot File with Ristretto Image Viewer

How to Uninstall Wine

If you don’t want to use Windows-compatible software on your Kali computer anymore, you can easily uninstall WineHQ software via the terminal to increase disk space and free your system from unnecessary software.

   Step 1

To uninstall Wine, execute the “sudo apt remove wine* -y” command in the terminal and wait for the uninstall process to complete.

sudo apt remove wine* -y

Uninstalling Wine

   Step 2

After removing WineHQ from your system, execute the command “sudo apt autoremove -y && sudo apt autoclean -y” to clean unnecessary packages as well.

sudo apt autoremove -y && sudo apt autoclean -y

Cleaning Unnecessary Packages Related to Wine

   Step 3

Finally, execute the commands below in the terminal to delete the sources and key files that Wine has defined for your system from the relevant locations. When you run the “wine –version” command again to verify the uninstallation, you can see that it has completely deleted the software.

sudo rm -rf /etc/apt/sources.list.d/winehq-bullseye.sources
sudo rm -rf /usr/share/keyrings/winehq-archive.key

Deleting Sources and Key Files

   Video

   Related Articles


How to Run Wine on Ubuntu
How to Run Wine on Linux Mint
How to Use PlayOnLinux on Linux Mint
How to Use PlayOnLinux on Ubuntu
How to Use PlayOnLinux on Debian

Add a Comment

Your email address will not be published. Required fields are marked *