- 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
- How to Install WineHQ
- How to Install a Windows Application
- How to Uninstall Wine
- Related Articles
- Как установить и использовать Wine на Kali Linux
- Что такое Wine
- Установка Wine на Kali Linux
- Настройка Wine на Kali Linux
- Запуск приложений Windows на Kali Linux с помощью Wine
- Установка дополнения Wine Winetricks
- Заключение
How to Install Wine 7.0 (Stable) on Kali Linux 2022
Last Updated: August 25, 2022 | Linux | Tolga Bagci
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 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.
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
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/
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
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
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.
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.
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.
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.
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
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.
After reading the license terms of the LightShot program, accept it and click Next.
After installing LightShot on your Kali Linux system, click the Finish button to close the installation wizard.
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.
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.
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.
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
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
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
Related Articles
TolgaBagci
Hello, I’m Tolga! I am a computer specialist who has been specializing in computer technologies for about 20 years. I provide solutions to problems encountered in many areas such as hardware, system, network, virtualization, server systems, and operating systems, and create relevant content on my website by explaining how to solve these problems. My goal is to be a reliable source of expert, quality, and trustworthy solutions for your computer problems. By following innovations and using the latest technologies, I aim to be successful in my job and provide you with the best service. Don’t hesitate to contact me for any questions or curiosity about technology. Have a nice day, stay up to date 🙂
Как установить и использовать Wine на Kali Linux
Сегодняшняя статья для тех, кто перешел с Windows на Kali Linux, но хочет продолжать использовать приложения Windows. Далее покажу, как установить Wine и запускать Windows приложения и игры на Kali Linux.
Что такое Wine
Многие могут подумать, что Wine — это эмулятор Windows на Kali Linux, но это не так, Wine на лету переводит вызовы API Windows в вызовы POSIX, без потерь производительности, которая присутствует в эмуляторах и тем самым позволят эргономично использовать приложения Windows на Kali.
Установка Wine на Kali Linux
Для установки Wine на Kali Linux, выполните команду:
На следующем скрине видно, что у меня уже установлена последняя версия Wine.
Для запуска Wine, нам нужен wine-32.
Сначала нужно добавить поддержку 32-битной архитектуры:
После этого обновить систему:
Теперь можно установить wine32:
Это может занять несколько минут в зависимости от скорости интернета и производительности системы.
После установки перезагрузите систему, выбрав Yes (используйте клавишу Tab).
Настройка Wine на Kali Linux
Теперь необходимо настроить Wine для запуска приложений Windows:
Здесь можно настроить Wine: выбрать версию Windows, библиотеки, графику, аудио, драйверы и т. д., но пока мы оставим настройки по умолчанию.
Запуск приложений Windows на Kali Linux с помощью Wine
Все готово для запуска приложений и игр Windows на Kali Linux. Нужно просто ввести команду и название файла:
Для примера, установим популярный текстовый редактор notepad++ на Kali Linux.
Откройте терминал, перейдите в папку, где лежит файл установки (в моем случае он находится в каталоге /Downloads) и выполните команду:
Начнется знакомый для пользователей Windows процесс установки.
После завершения установки, появится ярлык Windows-приложения на рабочем столе Кали.
Можно запускать Notepad++ прямо с рабочего стола или из меню приложений. Разве это не круто?
Чтобы для установки файла, не лезть каждый рез в терминал, вы можете выбрать wine для открытия всех exe-файлов, выполнив команду:
Теперь щелкните правой кнопкой мыши по любому исполняемый файлу .exe и в выпадающем меню, выберите пункт Open With Other Application… (открыть с помощью другого приложения).
Спуститесь вниз, выберите Wine Windows Program Loader и отметьте галочкой Use as default for this kind of file (Использовать по умолчанию для таких файлов). После чего нажмите Open (Открыть).
После этого система будет открывать все исполняемые файл в Wine.
Вот так можно установить любое приложение Windows на Kali Linux, даже такие, как Adobe Photoshop или Microsoft Office.
Wine создает в каталоге Home скрытую директорию со структурой файлов Windows.
Установка дополнения Wine Winetricks
Другой инструмент называется Winetrics, он помогает установить различные игры Windows, приложения, dll-библиотеки, шрифты и т. д.
Установите Winetricks с помощью команды:
Это маленький инструмент, который будет установлен за несколько секунд.
После установки, запускаем Winetricks:
- View help — открыть справку.
- Install application — установка приложения.
- Install benchmark — установка бенчмарка (тест на производительность).
- Install game — установка игр.
- Select the default wineprefix — выбор префикса по умолчанию.
- Create new wineprefix — создание нового wineprefix.
- Enable silent install — включить тихую установку.
Меню позволяет с легкостью установить приложения, игры и многое другое.
Вот список некоторых приложений Winetricks. Среди множества различных приложений есть версии Microsoft Office.
Заключение
Вот как с помощью Wine можно установить приложения и игры Windows на Kali Linux. Надеюсь статья была полезной.