How to Install Wine 9.0 on Kali Linux 2024

In this article, I will tell you about the Wine software to run Windows applications on Kali Linux 2024. WineHQ software allows you to use popular Windows software and games.

Therefore, you can install any EXE file you want on your Linux PC with this software. As a result, you can run these applications without needing an additional operating system on your Kali OS.

Installing Wine on Kali Linux

How to Set Up Wine 9.0 to Run Windows Apps on Kali Linux 2024

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. However, 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.

Suppose you have installed Kali Linux on your computer. In that case, 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 the 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. After installing the packages, rerun the WineHQ-Stable command.

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, you will be able to see the new packages that need 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 the “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 so the NET Framework applications 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 in which you want to use LightShot 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 from Kali Linux

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

Steps:

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

Conclusion

As a result, you can use one of the Wine versions on your Kali Linux 2024 system. You can run Windows applications regardless of whether you use the latest or the previous version.

With these detailed steps I have provided you, you can expand your software options on your Kali OS. Before I forget, be sure to research the WineHQ compatibility features before installing an app.

Thus, you can install any EXE software you want on your system without needing a separate Windows environment. Therefore, this method is beneficial for running productivity tools or games.

However, I recommend that you be careful when installing new software via Wine. Therefore, protect your security by regularly updating your system. In short, with the correct information and tools, you can ensure a smooth transition between Windows and Linux.

Add a Comment

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