Рано или поздно может понадобиться запустить программы Windows на Linux. Для операционной системы Linux написано огромное количество программ, для решения одной определенной задачи, может быть даже несколько десятков программ. Но такая тенденция наблюдается только для широко распространенных задач, что же касается специализированных программ и игр, то тут ситуация совсем иная.
Программ, для решения узкоспециализированных задач, например, в той же сфере СЕО для Linux попросту нет, а игры начали появляться только последние несколько лет. Были и раньше простенькие игры с открытым исходным кодом, но популярные игры, класса ААА начали появляться только тогда, когда этой платформой заинтересовалась Valve. Но до сих пор ситуация с играми обстоит не так, как хотелось бы. Поэтому и возникает необходимость установки Windows программ в Linux.
Немного теории
Windows программы не могут запускаться просто двойным щелчком по исполняемому файлу. Формат исполняемых файлов Linux очень сильно отличается от Windows. Поэтому для их запуска необходимо использовать специальное программное обеспечение — wine. Название Wine образовано с помощью, почему-то популярного в мире свободного программного обеспечения способа — рекурсивный акроним, и расшифровывается как Wine is not emultor. И это правда, wine не является эмулятором.
Это программная оболочка, которая преобразует системные вызовы Windows программ в вызовы функций операционной системы Linux. Таким образом, wine представляет из себя прослойку между Windows программой и операционной системой Linux вместе с ее ядром и библиотеками.
Чтобы понять как работает Wine, нужно сначала сказать несколько слов о ядре Windows. У Windows, так же как и у Linux есть ядро. Как вы знаете ядро Linux состоит из одного файла и находится в папке boot. Ядро Windows совсем другое, по сути это набор dll библиотек, которые расположены в папке C:\windows\system32. Поэтому нам, чтобы заставить Windows программы работать в Linux достаточно реализовать dll библиотеки, которые нужны программе, так чтобы они вызывали необходимые нам функции из системы linux, что собственно и делает Wine. Но проект развивается очень медленно и разработчики не успевают реализовать все функции из системных библиотек Windows, поэтому работают далеко не все программы, особенно новые.
Популярные программы в Wine запускаются легко, и без дополнительных настроек. Но дело в том, что для решения популярных и востребованных задач в Linux есть достаточно альтернатив, а запускать нам придется специализированные программы и игры, требующие серьезных компонентов, еще не написанных в Wine. Вот тут и всплывает недоработанность этой программы. Но есть выход, его мы и рассмотрим дальше.
Основы использования Wine
Все файлы программ wine, установленные программы, библиотеки, файлы реестра, конфигурационные файлы находятся в домашнем каталоге, а точнее, в ~/.wine.
Поскольку для разных программ, понадобится разная архитектура библиотек и нужно будет подменять на оригинальные библиотеки от windows разные файлы была придумана такая возможность, как префиксы.
Папка ~/.wine это префикс, но мы можем создавать для каждой новой программы свой префикс и она будет работать только с ним. Чтобы задать префикс, с которым нужно работать wine используется переменная окружения WINEPREFIX, например:
export WINEPREFIX=~/program
Для разных программ может потребоваться различная архитектура системы, wine может запускать и 64 битные программы, но многим для правильной работы нужна архитектура х86.
Чтобы задать архитектуру используйте переменную WINEARCH. Например, для х86:
export WINEARCH=win32
Также не создавайте папку для нового префикса с помощью mkdir или файлового менеджера, пусть программа сама создаст эту папку при своем первом запуске.
Прослойка совместимости Wine поддерживает далеко не все программы, чтобы проверить поддерживается ли программа Wine вы можете воспользоваться сайтом appdb.winehq.org здесь есть поиск и перечислены все поддерживаемые и не очень программы для Linux.
Запуск exe программ в Linux с помощью wine
Первым делом, надо посмотреть страницу программы на сайте appdb.winehq.com. Здесь есть поиск, поэтому вы можете попытаться искать нужную программу. Например, я хочу установить довольно популярную программу Notepad++. Cначала надо посмотреть поддерживается ли она Wine. Для этого на сайте есть поиск:
На странице программы есть версия Wine, с которой она была протестирована, версия тестируемой программы, а также оценка. Оценка может быть Platinum, Gold, Silver или ниже, она зависит от того насколько хорошо программа работает:
Как видите, программа тестировалась с версией wine 5.0 и работала довольно неплохо. К тому же на странице есть ссылка на загрузку программы, так как она бесплатна. Если при запуске программы возникают сложности, то на странице winehq обычно сообщается что надо сделать чтобы программу всё-таки запустить.
Если вам нужно запустить программу, полностью поддерживаемую Wine, например, проводник или notepad, достаточно выполнить:
$ wine /адрес/файла/программы.exe
Например, для программы Notepad++ надо выполнить:
wine ~/Загрузки/npp/notepad++.exe
Здесь я использую portable версию, её надо перед этим скачать и распаковать. Как видите, программа полностью работает:
Но как я уже говорил, нам придется запускать мало таких программ, большинство из них будут требовать функциональности, которая ещё не реализован в wine. Тогда нам придется заменить библиотеки Wine, на оригинальные библиотеки Windows.
Конечно, есть оболочки для Wine, которые автоматизируют этот процесс, например, Crossover, PlayOnLinux, Lutris и другие. Но мы рассмотрим ручной вариант.
Для установки компонентов Windows в wine существует специальный инструмент — winetricks. Устанавливать его лучше из сайта программы, так версия будет новее:
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
Чтобы установить нужный компонент достаточно передать имя этого компонента:
$ winetricks имя_компонента
С установкой компонентов более-менее понятно, но как узнать какие компоненты нужны? Скорее всего, вашу программу уже пытались устанавливать и другие пользователи нашли решение проблемы. Поэтому воспользуйтесь поиском Google для того, чтобы найти способы установки программы. Также очень полезным будет сайт appdb.winehq.org.
Давайте рассмотрим пример. Наберите в поиске по appdb.winehq.com программу Internet Explorer 8, это последняя версия программы, которую можно установить в Linux. Как видите, здесь бронза, значит программа поддерживается:
На её странице сообщается, что программа работает, но для её работы надо установить компонент msxml и urlmon:
winetricks msxml6 urlmon
После установки этих пакетов программа надо добавить ключ в реестр, который описан на странице winehq. После этого установщик запуститься и установит программу.
wine ~/Загрузки/iexplorer.exe
После установки вы можете её запустить:
Выглядит всё не очень, но зато работает. Инструкции не обязательно искать только на winehq, это могут быть различные форумы, блоги и так далее.
Остается вопрос, что же делать, если инструкций нет, информации минимум, а нужно чтобы программа работала. Мы можем анализировать вывод Wine при запуске программы. Причем нас будут интересовать не все сообщения из лога программы, а только последние, именно то что вызвало ошибку. Например если программа вывела:
fixme:richedit:ITextRange_fnEndOf (0xa04410)->(6 0 (nil)): stub
fixme:richedit:ITextRange_fnEndOf (0xa04410)->(6 0 (nil)): stub
fixme:richedit:ITextRange_fnEndOf (0xa04410)->(6 0 (nil)): stub
Осталось понять, что такое richedit, и Microsoft TechNet нам любезно сообщает что это их API и состоит оно из Riched32.dll, это последняя версия, но раньше это была riched20.dll, уже понимаете какие библиотеки нужны?
Их можно установить с помощью winetricks, но это делать необязательно, можно и вручную. Скачайте библиотеки, найти их не составит труда с помощью Google. Только ищите версию для Windows XP.
Копируем библиотеку в наш префикс, в папку system32:
cp ~/Загрузки/riched32.dll ~/program/drive_c/windows/system32/
cp ~/Загрузки/riched20.dll ~/program/drive_c/windows/system32/
Для 64 битных библиотек используется папка syswow64, а поскольку мы указали архитектуру 32 бит нужно и библиотеки использовать соответствующие. Затем запустите winecfg и на вкладке библиотеки, в поле новое замещение для библиотеки наберите *riched32, затем добавить и *riched20 и опять добавить:
Все, теперь можете пробовать запускать программу. Если программа снова падает с ошибкой, смотрите дальше логи и ищите библиотеки, которых ей не хватает.
Таким образом, вы можете заменить много библиотек Wine. Можно запустить практически любую программу, написанную несколько лет назад и не требующую сверх новых технологий. Достаточно только заменить нужные библиотеки. Вы можете не только использовать winetricks или копировать библиотеки из интернета, но и брать их прямо из Windows. Точно не стоит заменять gdi32.dll, kernel32.dll, и user32.dll — эти библиотеки реализуют функции ядра Windows на самом низком уровне, и если их заменить, это только нарушит работу Wine. Наверное, есть и другие библиотеки, которые нельзя заменять, но это вычисляется только путем экспериментов.
Вариант, который мы рассмотрели выше слишком сложный и не очень то подходит для новичков. Специально для таких ситуаций были придуманы различные программные решения вроде PlayOnLinux или CrossOver. Это оболочки над wine, которые уже знают какие библиотеки надо ставить для той или иной программы. Вы просто выбираете программу, выбираете установщик, а дальше программа сделает всё за вас сама.
Утилита Crossover поддерживает множество программ и работают они довольно неплохо, но единственный минус этой программы в том, что она платная. Программа PlayOnLinux бесплатная, но поддерживает намного меньше программ.
Запуск Windows программ в виртуальной машине
Если ни один из перечисленных выше способов вам не помог, осталось только последнее решение. Оно поможет, при условии, что у вас мощный компьютер. Вы можете установить виртуальную машину VirtualBox, затем установить туда Windows и уже там запускать вашу программу. Можно пойти ещё дальше и сделать из старого компьютера сервер, на котором будет запущена Windows, к которой вы сможете подключаться по VNC или RDP и делать там всё, что угодно. Это не совсем способы запуска exe в Linux, однако это решение будет работать почти всегда, где не будет работать wine.
Выводы
Теперь вы знаете как запустить exe на Linux. Не пренебрегайте инструментами упрощения установки вроде PlayOnLinux. Они очень сильно экономят ваше время, так как имеют уже готовые профили для многих программ. Экспериментируйте и пусть ваши программы работают без ошибок!
Обнаружили ошибку в тексте? Сообщите мне об этом. Выделите текст с ошибкой и нажмите Ctrl+Enter.
As you’re here, I’m going to assume that you’re a Linux user. And every once in a while, you find yourself asking: can I run windows applications on Linux?
The answer to that question is yes. Yes, you can run Windows applications in Linux. Here are some of the ways for running Windows programs with Linux:
- Installing Windows on a separate HDD partition
- Installing Windows as a virtual machine on Linux
Both of them work just fine. But they are somewhat resource hungry.
If you only need to use a small Windows application, installing Windows on a separate HDD partition or as a Virtual Machine is not efficient. Moreover, Virtual Machine can’t utilize the total power of your machine. So, what is the solution?
No worries, there is another way to use Windows software on Linux. It’s called Wine. If you aren’t yet familiar with it or you are a beginner in the world of Linux, this article is for you.
In this beginner’s guide, I’ll show you what Wine is and how to use it to run Windows software on Linux. I have used Ubuntu here as Ubuntu is one of the best Linux distros for beginners, but any other Linux distribution will have more or less the same steps (except for the commands in Arch or Fedora-based distros).
Using Wine to run Windows programs in Linux
Wine stands for Wine Is Not an Emulator. And WINE is actually an acronym for that. And as previously stated, it’s not even a virtual machine.
Rather it is a compatibility layer for running Windows applications on UNIX-like, POSIX-compliant operating systems (e.g. Linux, Mac, BSD). While a virtual machine or emulator simulates internal Windows logic, Wine translates those Windows logic to native UNIX/POSIX-complaint logic.
In simple and non-technical words, Wine converts internal Windows commands to commands your Linux system can natively understand.
Installing Wine
There are various ways to install Wine on your system. Almost all the Linux distros come with Wine in their package repository. Most of the time the latest stable version of Wine is available via the package repository.
If you are using a 64-bit installation of Ubuntu, you will need to add 32-bit architecture support on your distro which will benefit you in installing specific software. If you don’t know whether you have a 32-bit installation or 64-bit, check this article on how to check if you have a 32-Bit or 64-Bit Computer.
Once confirmed, do this by executing the following command:
sudo dpkg --add-architecture i386
In Ubuntu, you can install Wine by:
sudo apt update
sudo apt install wine
Get the latest WINE version (optional)
But in the case of Ubuntu 22.04 LTS, the available package in the repo is Wine v6.0.3, while the latest stable release is v7.0.1. In the case of software like Wine, which receives significant updates frequently, always try to remain in the latest stable release. To do this in Ubuntu, first, you need to add the 32-bit architecture with the above step. Then download and add the repository key:
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
In the next step, you need to download the Wine source file. For that, you need wget installed.
sudo apt install wget
Also, you should know which version of Ubuntu is running on your system. In my case, I was running Ubuntu 22.04 Jammy Jellyfish.
To know your version, run this command in a terminal window:
lsb_release -cs
Once you get your version name, replace this in place of jammy and execute the command below:
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
Now update the package information.
sudo apt update
Finally, install the latest stable version of Wine with:
sudo apt install --install-recommends winehq-stable
You can use winehq-devel
or winehq-staging
for Development and Staging branch respectively.
Getting Started with Wine
Before we go on installing and running applications in Wine, we should have a clear idea about a few things and about how to configure Wine for usage:
WinePrefix
Windows applications need a C: drive. Wine uses a virtual C: drive for this purpose. The directory of this virtual C: drive is called wineprefix. First of all, you need to create a wineprefix. To do that, fire up a terminal and enter this command:
winecfg
Here it prompts you to install the Wine Mono package needed for the .NET application to work properly. You can press the Install button to do this job.
This will create a wineprefix and open the configuration window for Wine. You can change the configuration options or let it be as it is and close it.
Now, you can locate the virtual C: drive at
$HOME/.wine/c_drive
The general rule is to install each new application into a fresh wineprefix. You can create and maintain multiple wineprefix manually. But that task would seem rather tedious for beginners. So, we will skip that part for now. But, later I will show how to do that part with ease.
Which Windows applications are supported by Wine?
A large number of Windows applications are currently fully supported by Wine. They will run without any hassle.
However, new Windows applications are being developed every day. Many of them wouldn’t function as we want on Wine. But the development pace of Wine is also rapid, and support for new applications is being added all the time.
And there is a dedicated database for keeping track of just that.
Wine Application Database has almost 28,000+ applications rated with different statuses depending upon how well those applications run in Wine. If you want to quickly check the rating of the application you want to use in Wine, you can take a look there. Here is the meaning of those ratings:
- Platinum: These applications install and run flawlessly in out-of-the-box Wine.
- Gold: These applications work flawlessly with some special configurations.
- Silver: Applications with minor issues are tagged as Silver.
- Bronze: The Bronze ones have major issues that seriously affect usage.
- Garbage: These simply won’t run on Wine.
Reviews, Installation Procedure, which Wine version it was tested against and various useful data are also available for each application here.
Of course, Wine Application Database is mostly user-generated data, so you are always welcome to try running an application with a different version of Wine and share your result with the rest of the community.
Finding an Application in Wine Application Database
Let’s see how we can find an application in Wine Application Database.
Go to Wine Application Database. Click Browse Apps from the left sidebar.
Click on the link to the application from the search result. You’ll see a description of the application. There will be a list of various versions with their compatibility rating with a specific Wine version.
Let’s click on the latest version link. This is the main page you need to check. There will be detailed information about that specific version.
Installing an Application with Wine
Installing a supported application in Wine is generally as easy as double-clicking on the installation file. However, you will now see a step-by-step guide for installing 7-zip on Wine.
First of all, check for 7-zip rating on Wine Application Database. It has a Platinum rating, so we are good to go. Open Wine configuration ( winecfg ) and set the Windows Version to Windows 7 (Shown in the above screenshot).
Right-click on the 7-zip installation file and select the Open With Other Application option.
After that, select Wine Windows Program Loader.
See that destination folder path? The 7-zip installation has recognized the virtual C: drive from wineprefix.
Finish the installation and you can now open the 7-zip application from the Ubuntu Activities overview.
All you have to do is click on the icon. If you want to access your files on Linux, they are generally located in Z: Drive.
You can use the 7-zip just as you would use it on Windows – for extracting and creating archives and such.
Uninstalling an Application with Wine
As said above, installing an application is easier with Wine. To uninstall an application, you have a Wine Uninstaller tool. You can access this tool by entering the terminal:
wine uninstaller
This will open the uninstaller window. Here, the list of installed applications will be present. You need to select the application, 7-zip in this case, and press Modify/Remove button as shown below:
This will initiate the uninstall process and can be completed easily on an application basis.
Let’s make things (a lot) Easier
You might have noticed that, in Wine Application Database, a specific Wine version is mentioned with every version of the application reviews.
It is because of the rapid development rate of Wine. Though an application runs with the current version of Wine, it might not run with a future version, because of the changes made.
Also, I’ve mentioned installing each application in its own fresh wineprefix. So, an application has no chance of interfering with another. And doing all these manually, usually from the terminal, is time-consuming, tiresome, and sometimes confusing.
PlayOnLinux is here to rescue you. It provides a nice interface for doing all these things easily. For installing PlayOnLinux on Ubuntu, simply run this command:
sudo apt install playonlinux
You can easily perform every task related to Wine with PlayOnLinux from a beautiful and intuitive graphical interface:
- Installing & Uninstalling applications.
- Creating, Updating & Removing wineprefixes.
- Maintain Wine of different architecture and versions.
- Run & Create shortcuts for installed applications.
- And so on…
But still, you will need to check Wine Application Database for reviews, installation procedures, and such.
Advantages of using Wine
When it comes to running Windows applications on Linux systems, Wine provides many advantages over using emulators or virtual machines.
- Performance: Wine is immune to the performance loss that otherwise occurs while emulating.
- Native Experience: There is no need to open Wine before running a Windows application. Exactly how Wine works will be clear from this quote from the official site,
Wine can be thought of as a Windows emulator in much the same way that Windows Vista can be thought of as a Windows XP emulator: both allow you to run the same applications by translating system calls in much the same way. Setting Wine to mimic Windows XP is not much different from setting Vista to launch an application in XP compatibility mode.
Wine Derivatives
There are quite a number of projects for running Windows applications on other platforms, based on Wine:
- CrossOver: CrossOver is developed by the company named CodeWeavers. It is directly based on Wine with a few tweaks and proprietary add-ons. In fact, CodeWeavers employs a large portion of Wine developers. Unlike the rapid releases of Wine, CrossOver releases are more stable. The one major downside is that Crossover is not free.
- PlayOnLinux: PlayOnLinux is completely based on Wine. And provides an easier route for installing and managing applications with Wine. PlayOnLinux is free. It is also available for Mac as PlayOnMac.
- Bottles: Bottles app got huge popularity recently, because of its ease of use and various other life-saving features. It is available as a flatpak to install on all Linux distributions. You can run Applications and Games inside bottles.
- ReactOS: ReactOS is an entirely different open-source operating system for running Windows applications. It reuses a considerable amount of codes from Wine. However, this is a project under development for more than a decade and I won’t recommend it.
Purchase CrossOver Through the CodeWeavers Store Today!
Buy CrossOver Mac and CrossOver Linux through the CodeWeavers store. Choose from 12 month and lifetime license plans. Renewals are also available for purchase.
CodeWeavers
Additional Tips on using Wine
Winetricks
This is another important part of using Wine. Winetricks is a helper script to download and install various redistributable runtime libraries needed to run some applications in Wine. These may include replacements for components of Wine using closed-source libraries. Winetricks comes with Wine installation on Ubuntu through the package manager.
For starting winetricks, run this command:
winetricks
If you have installed Wine from Wine official repository, you may need to install winetricks separately.
To do this, open a terminal and enter the following commands:
cd "${HOME}/Downloads"
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
Now open Winetricks with:
./winetricks
There are many options for helping you with various tasks.
Installing an Application with Winetricks
If you Install an app from winetricks, it will be installed in a separate wineprefix. Let’s install VLC:
So, select install an app from the options and click OK:
Now select VLC from this list:
It will then begin to download the VLC installation files. And then guide you through the rest of the process. It’s pretty simple.
Install Windows DLL or components and others
You can select a wineprefix from winetricks and install various libraries and components required by the application you want to run and also perform other operations.
And then select the required DLL or component to install:
📋
N.B.: If using winetricks seems complicated to you, it’s perfectly okay. I feel the same way too. I always use PlayOnLinux for this reason. PlayOnLinux can do everything you might need to do from winetricks.
For more information, you can check Wine FAQ and Documentation.
I hope you find this complete beginner’s guide to using Wine in Linux helpful. Now you can run Windows programs in Linux without installing a virtual machine or dual booting.
Let us know if you have any questions or opinions in the comment section below.
Если вы считаете, что GIMP не ровня Photoshop, и не можете жить без офиса от Microsoft.
1. Wine
Название Wine расшифровывается как Wine Is Not an Emulator. Это своего рода прослойка между приложениями Windows и системой Linux. Он позволяет устанавливать и запускать многие популярные Windows-программы и работать с ними так, как будто это родные приложения Linux.
Чтобы установить Wine, воспользуйтесь соответствующей командой.
1. Ubuntu, Debian, Mint:
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo add-apt-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ artful main"
sudo apt-get update
sudo apt-get install --install-recommends winehq-stable
2. Fedora:
sudo dnf install winehq-stable
3. openSUSE:
sudo zypper install wine
4. Arch, Manjaro:
sudo pacman -S wine
Когда Wine установлен, откройте его через ваше меню приложений или с помощью команды winecfg
. При первом запуске Wine может попросить установить некоторые дополнительные пакеты — позвольте ему это сделать. После этого все Windows-программы формата EXE ассоциируются в системе с Wine.
Теперь скачайте установщик нужного вам приложения Windows, найдите папку с ним в вашем файловом менеджере и откройте файл. Либо введите команду wine путь_к_приложению
.
Windows-приложение запустится и будет работать так же, как и всегда. Если вы открыли установочный файл, начнётся установка приложения — как в Windows. Если программа не требует установки, вы сможете начать работать с ней немедленно.
Не все приложения могут быть установлены и запущены в Wine, хотя количество поддерживаемых впечатляет. Полный список можно посмотреть здесь.
2. Winetricks
Wine — неплохой инструмент, однако интерфейс у него оставляет желать лучшего. Если вы намучились с этой программой, но так и не добились результата, попробуйте Winetricks. У неё приятный графический интерфейс для установки и запуска Windows-приложений, в котором куда проще разобраться новичку.
Установить Winetricks можно так:
1. Ubuntu, Debian, Mint:
sudo apt-get install winetricks
2. Fedora:
sudo dnf install winetricks
3. openSUSE:
sudo zypper install winetricks
4. Arch, Manjaro:
sudo pacman -S winetricks
Winetricks позволяет установить различные версии Microsoft Office и Photoshop, плеер foobar2000 и множество других программ. Поддерживаются и такие популярные игры, как Call of Duty, Call of Duty 4, Call of Duty 5, Biohazard и Grand Theft Auto: Vice City. Некоторые программы загружаются автоматически, для других будет предложено вставить установочный носитель. И, естественно, вы можете открывать собственноручно скачанные файлы формата EXE.
3. PlayOnLinux
PlayOnLinux — ещё один удобный инструмент для запуска Windows-приложений в Linux. Как и Winetricks, он обладает простым графическим интерфейсом. Но, в отличие от него, PlayOnLinux позволяет вам выбирать конкретную версию Wine для того или иного приложения. Это полезно, если какая-то из нужных вам программ некорректно работает с новыми версиями Wine. В целом PlayOnLinux выглядит куда симпатичнее и практичнее, чем Winetricks.
Чтобы установить PlayOnLinux, выполните в терминале одну из следующих команд:
1. Ubuntu, Debian, Mint:
sudo apt-get install playonlinux
2. Fedora:
sudo dnf install playonlinux
3. OpenSUSE:
sudo zypper install playonlinux
4. Arch, Manjaro:
sudo pacman -S playonlinux
В меню установки PlayOnLinux можно найти множество предварительно сконфигурированных приложений и игр, которые вы можете загрузить и установить парой щелчков. Кроме того, PlayOnLinux можно скармливать собственные EXE-установщики. Приложение заботливо выберет за вас версию Wine и создаст значок установленной программы на рабочем столе.
4. Crossover
Изредка бесплатные PlayOnLinux и Winetricks не справляются с установкой какого-нибудь особенно привередливого приложения. В таком случае вам может помочь Crossover. Эта программа очень проста в использовании. Вам достаточно указать, какое приложение вы хотите установить, и подсунуть Crossover установочный файл. Всё остальное будет сделано за вас.
Лицензия Crossover на год стоит 39,95 доллара, но у программы есть и бесплатная пробная версия. Рекомендуется сначала установить необходимое вам приложение в ней, чтобы убедиться, что оно работает корректно.
Crossover →
5. VirtualBox
Если ваше приложение упорно отказывается запускаться в перечисленных выше программах, можно пойти на решительные меры и установить его в виртуальной машине. Учтите, что она отнимает гораздо больше системных ресурсов, поэтому использовать её стоит в крайних случаях.
Для запуска приложения в виртуалке вам понадобится установочный образ Windows в формате ISO. Загрузите и установите VirtualBox, создайте в нём виртуальную машину, укажите ей ISO с Windows, а затем просто установите систему как обычно.
Неоспоримый плюс виртуальной машины — в ней работает полноценная операционная система, а значит, запустится абсолютно всё. Минус — прожорливость в плане системных ресурсов, да и тратиться на лицензию Windows для виртуалки накладно.
VirtualBox →
Читайте также 🧐
- 6 задач, с которыми Linux справляется лучше, чем Windows
- Как реанимировать Windows и сохранить данные с помощью live-дистрибутива Linux
- Как обмениваться файлами по воздуху между Windows, macOS, Linux, iOS и Android
There is no single operating system that can satisfy all the needs. All of them have their own pros and cons. Windows is most loved by gamers, whereas Linux is perfect for running services. Well, on the other hand, Windows attracts more cyberattacks than Linux because of its flaws. Linux is more stable than Windows. Despite that, Windows has a large user base and a large set of applications than Linux. Neither is perfect for everything. It is a debatable topic. Let’s not get into it now. It’s time to combine both the platform and make them work together to reap the maximum out of it. Yes, there are ways to run Windows apps on Linux. We have decided to help our readers to run Windows apps on Ubuntu, one of the most popular Linux distributions in the Linux world.
In this post, we have chosen Ubuntu Linux to show the step-by-step procedure to run Windows apps on Linux. but, of course, you can try this out on other Debian-based distributions as well.
Table of Contents
Why Do Users Want To Run Windows Apps On Ubuntu (Linux)?
There could be many reasons to run Windows apps on Linux. However, the most common reasons are:
- Some programs and games have been developed only for the Windows platform. This may stop users to migrate Linux, or, in other words, Linux users can’t enjoy those apps and games on the Linux platform.
- This opportunity will give a chance for Windows users to migrate Linux as they can run their favorite Windows programs on the Linux of their choice.
- Linux is more stable and robust, but Windows has a large set of programs. This will give more flexibility for users to run both Windows and Linux apps on a single platform.
What Do You Need To Run Windows Apps On Ubuntu (Linux)?
Just you need a Ubuntu running system with WINE on your Ubuntu. Well, you can use this method on other Linux distributions like Fedora, Debian, Linux Mint, and macOS.
What Is Wine?
“Wine (originally an acronym for “Wine Is Not an Emulator”) is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on the fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.“
How To Run Windows Apps On Ubuntu Linux?
The procedure to run Windows apps on Ubuntu Linux is quite simple. We have segregated this procedure into six sub sections. Let’s see all these sections in practical.
- Install Wine on Ubuntu Linux.
- Configure Wine on Ubuntu Linux.
- Install Windows applications on Ubuntu Linux.
- Set up Wine as the default program to load Windows applications.
- Install Winetricks.
- Use Winetricks to install Windows programs.
How to Run Windows Apps on Ubuntu Linux?
- Check the Ubuntu release version on the command line
Let’s start this by checking the version of Ubuntu we have, We are running Ubuntu 20.04.2 LTS on our machine. The command to check the Linux version:
$ cat /etc/os-release
- Install wine on command line
Let’s start the process by installing the Wine on Ubuntu Linux. The command to install Wine on Ubuntu:
$ sudo apt install wine
- Wine installation is in progress…
Wine installation in progress
- Wine installation completed
Wine installation completeed.
- install 32-bit architecture package of wine
If your system architecture is 64-bit. You can’t run 32-bit Windows programs. However, you can install 32-bit programs as well. For that, you should install 32-bit architecture to run 32-bit programs.
Install 32-bit architcture:
$ sudo dpkg –add-architecture i386Download and add the repository key:
$ wget -nc https://dl.winehq.org/wine-builds/winehq.keyAdd the repository:
$ sudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ focal main’ - Update repository on Ubuntu
Update the repository:
$ sudo apt update - Install wine32
Install Wine32 to run 32-bit Windows packages:
$ sudo apt install wine32
In our case, it’s already installed on our machine.
- Check the wine installation
Confirm the Wine installation on Ubuntu Linux:
Issue the command to confirm the wine installation.$ wine
- How to configure Wine?
Issue the ‘winecfg’ command to open the configuration window of Wine. Many directories and files will create when you initiate Wine configuration for the first time. You can configure Windows Libraries, Graphics, Drivers, Audio, and Windows version environment.
$ winecfg
- How to install Windows applications on Ubuntu Linux?
We are going to download and install the Notepad++ exe on Ubuntu Linux for demonstration.
Download Notepad++.$ wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8/npp.8.0.Installer.x64.ex
- Installation of notepad++.exe
Use the wine command to run the Notepad++ exe file.
$ wine npp.8.0.Installer.x64.exe
The installer will launch like a Windows installer.
- Begin the installation of notepad++
Just install the app like a windows app. Click Next.
- Browse the installation directory
Browse the location and click Next like in Windows installation.
- Create the Desktop icon
Check on ‘Create a desktop icon’.
- Finish the installation of Notepad++
Finish Installation.
- Run Notepad++ application on Ubuntu Linux as in Windows
You can run the Notepad++ application on Ubuntu Linux as in Windows. You can notice the Notepad++ icon has appeared on the Ubuntu Desktop.
- See the Notepad++ inside the menu apps
You can see the Notepad++ inside the menu apps. You can run the app from the Ubuntu Apps either.
- How to set up Wine as the default program to load Windows applications?
You can’t execute the Windows installers by double-clicking until you configure Wine as the default Windows program loader. You can do this by creating the Wine program’s symbolic link under the application directory.
$ sudo ln -s /usr/share/doc/wine/examples//wine.desktop /usr/share/applications
- Create symbolic link of the application under the application directory
- Add application to the default program’s list
Right-click on the file. Select Properties. Go to the ‘Open With’ tab. You will find the ‘Wine Windows Program Loader’ at the end of the list. Select the Wine program loader then click on ‘set as default‘.
- Run application as the default program
Now, you can launch any Windows installer files by double click or right-clicking and selecting ‘Open with Wine Windows Program Loader‘.
- How to install Winetricks?
Winetricks is an on-top application that can be used to install additional Windows applications, games, DLL libraries, fonts, Windows components, Visual C++, Dotnet framework, and many more things. Use this command to install ‘Winetricks’ on Ubuntu Linux.
$ sudo apt install winetricks
- Run Winetricks in GUI mode
You can run Winetricks in GUI mode to install applications. Use this command to run Winetricks in GUI mode:
$ winetricks
You can install any application, game, Windows components, and many more in GUI mode. The installation procedure is quite simple. Follow the instructions.
- List of applications available on Winetricks
List of applications available on Winetricks:
- List of games available on Winetricks
List of games available on Winetricks:
Overview of Wine Windows environment in Linux:
Wine creates the Windows environment inside .wine directory under the user’s home directory. The .wine directory will be hidden by default. Unhide the directory and explore the file system. You will find the complete Windows C drive inside the .wine directory. You will also get the user’s directories, Download folder, Documents folder, System32, Program Files, including regedit option to create, edit, and delete the Windows registries. We urge you to explore the Windows file system inside the Wine.
That’s all about Wine. This is how you can install and run Windows apps on Ubuntu Linux.
We tried to cover most of the information which need for beginners to run Windows apps on Ubuntu Linux. Please share this post with your contacts and help share the valuable information.
Frequently Asked Questions:
1. What is Wine?
Wine is an open-source compatibility layer that allows users to run Windows applications on Unix-based operating systems such as Linux, macOS, and FreeBSD. Wine translates Windows system calls into equivalent POSIX calls, enabling Windows programs to run seamlessly on Unix-based systems without requiring a Windows license or virtual machine.
2. Can I run all Windows applications on Ubuntu using Wine?
While Wine supports a large number of Windows applications, it does not guarantee compatibility with all software. Some applications may run flawlessly, while others may have limited functionality or not work at all. You can check the Wine Application Database (AppDB) to see the compatibility status of specific Windows applications.
3. How do I install Wine on Ubuntu?
To install Wine on Ubuntu, follow these steps:
1. Open the Terminal application.
2. Update your package lists by running sudo apt update.
3. Install Wine by running sudo apt install wine-stable.
After the installation is complete, Wine should be available for use on your Ubuntu system.
4. How do I run a Windows application using Wine?
To run a Windows application using Wine, follow these steps:
1. Download the Windows application’s installer file (usually a .exe or .msi file).
2. Open the Terminal application.
3. Navigate to the directory containing the installer file using the cd command.
4. Run the installer using Wine by typing wine <installer_filename.exe> and pressing Enter.
After the installation is complete, you can run the Windows application from your Ubuntu system using Wine.
5. Can I use PlayOnLinux to run Windows applications on Ubuntu?
Yes, PlayOnLinux is a graphical user interface (GUI) for Wine that simplifies the process of running Windows applications on Linux. It automates the installation and configuration of Wine and provides an easy-to-use interface for managing multiple Wine versions and Windows applications.
6. Are there any alternatives to Wine for running Windows applications on Ubuntu?
There are several alternatives to Wine for running Windows applications on Ubuntu:
1. Virtual machines: You can use virtualization software like VirtualBox or VMware to create a Windows virtual machine and run Windows applications within it.
2. Dual boot: You can install Windows alongside Ubuntu on your computer, allowing you to choose between the two operating systems during startup.
3. CrossOver: CrossOver is a commercial version of Wine developed by CodeWeavers, offering a more polished experience and additional features.
7. Is it safe to run Windows applications using Wine?
While Wine allows you to run Windows applications on Linux, it is not immune to the security risks associated with running potentially malicious or vulnerable software. It is essential to keep your system and software up to date, use reputable antivirus solutions, and follow security best practices to protect your system from threats.
8. How can I uninstall a Windows application installed using Wine?
To uninstall a Windows application installed using Wine, follow these steps:
1. Open the Terminal application.
2. Run the Wine uninstaller by typing wine uninstaller and pressing Enter.
3. The “Add/Remove Programs” window will appear, displaying a list of installed Windows applications.
4. Select the application you want to uninstall and click the “Modify/Remove” button.
5. Follow the on-screen prompts to complete the uninstallation process.
9. Can I use Wine to run Windows games on Ubuntu?
Wine is capable of running many Windows games on Ubuntu, although performance and compatibility may vary depending on the game. Additionally, projects like Lutris and Proton (used by Steam for Linux) have improved gaming compatibility by leveraging Wine and other tools to optimize game performance and compatibility on Linux systems.
10. How can I get help with Wine-related issues?
For assistance with Wine-related issues, you can:
1. Consult the WineHQ website (
https://www.winehq.org/
) for documentation, guides, and FAQs.
2. Check the Wine Application Database (AppDB) for compatibility information and user-reported solutions for specific applications.
3. Visit the Wine forums (
https://forum.winehq.org/
) to ask questions, seek advice, and discuss issues with the Wine community.
4. Search for online tutorials, blog posts, and articles that address your specific problem or question.
11. How do I update Wine on Ubuntu?
To update Wine on Ubuntu, follow these steps:
1. Open the Terminal application.
2. Update your package lists by running sudo apt update.
3. Update Wine by running sudo apt upgrade wine-stable.
This will update Wine to the latest version available in the Ubuntu repositories.
12. How can I configure Wine settings?
To configure Wine settings, you can use the Wine Configuration tool (winecfg). To launch winecfg, follow these steps:
1. Open the Terminal application.
2. Run the Wine Configuration tool by typing winecfg and pressing Enter.
The Wine Configuration window will appear, allowing you to adjust various settings, such as graphics, audio, and Windows version emulation.
13. Can I use Wine to run 64-bit Windows applications on Ubuntu?
Yes, Wine supports both 32-bit and 64-bit Windows applications. However, you may need to install additional packages or configure Wine to enable 64-bit support. Ensure that you have the 64-bit version of Wine installed, which is usually included with most recent distributions of Ubuntu. If you experience issues running 64-bit applications, consult the Wine documentation or forums for assistance.
14. How can I create a desktop shortcut for a Windows application installed using Wine?
To create a desktop shortcut for a Windows application installed using Wine, follow these steps:
1. Right-click on the Ubuntu desktop and select “Create a new launcher here” or “Create Launcher.”
2. In the “Create Launcher” window, enter the application’s name in the “Name” field.
3. In the “Command” field, enter wine <path_to_application_executable>, replacing <path_to_application_executable> with the full path to the application’s .exe file.
4. (Optional) Click the “Browse” button next to the “Icon” field to select an icon for the shortcut.
5. Click “OK” or “Create” to create the desktop shortcut.
Now you can launch the Windows application directly from the desktop shortcut.
Arun KL
Hi All, I am Arun KL, an IT Security Professional. Founder of “thesecmaster.com”. Enthusiast, Security Blogger, Technical Writer, Editor, Author at TheSecMaster. To know more about me. Follow me on LinkedIn
We always desire to run Windows programs on Linux operating systems such as Ubuntu, Linux Mint, Fedora and more. It is because of a wide range of Windows applications that are not available for Linux Distros. It is another reason why people refrain themselves to switch from Windows to Linux OS.
Although there are so many alternative programs of Windows applications with identical functionality available for Linux such GIMP as an alternative to Photoshop, still, there are quite a lot of old & new-fashioned Windows applications with no open source alternatives.
However, if you are not a big fan of Windows OS and want to learn Linux curves without compromising or giving up your crucial Windows applications then there are few best ways to run Windows applications on Linux, which is obviously a thing a Linux operating system user should know about.
Trivia: One thing is to be noted that recently, the Microsoft has announced that they are about to integrate full-blown Linux kernel to Windows 10 which means in future you don’t need to be switched to Linux from Windows 10 for learning the Linux apps or commands. However, for Windows 7, it still would not be possible.
How to Run Windows EXE files on Linux such as Ubuntu
Wine for Linux
WineHQ is the best way to run Windows programs on Linux operating systems. It a cross-platform application which is available for Linux (Ubuntu, Debian, Fedora, OpenSUSE, Slackware), MacOS, FreeBSD and Android OS. Wine is an acronym that stands for Wine Is Not an Emulator, in lieu of being an emulator, it is a free and open-source compatibility layer that uses API conversion technology layer to runs Windows applications on a variety of POSIX-compliant operating systems such as Linux, Mac OSX, and BSD.
As said, it uses API conversion technology, thus, it makes a Linux-compatible function corresponding to Windows to call a DLL to run a Windows program. Wine release is completely open source and is distributed free of charge. (Based on LGPL release: GNU Wide General Public License). What we think that the true meaning of Wine should be the abbreviation of Windows Environment- WinE.
Well! now we know that Wine is not a Windows emulator so, it doesn’t run any kind of virtual machine or emulator to run Windows application which makes it more efficient and gives good integration capability with Linux OS.
Wine fully supports binary loading of Windows executables (.exe and DLL). Wine has a very robust and powerful built-in debugger that, in addition to supporting standard debugging features, is also customizable for debugging Windows binaries running on Linux. It is one of the best tools to run Windows software indeed, there are a lot of uncertainties when installing and running Windows applications in Wine, and sooner or later. So, there is no surety that all Windows applications will work on Linux using Wine, few glitches in some high-end applications are always there.
You can run MS-office, Final Fantasy X, Adobe Photoshop CS6, Battlefield (game), Media Monkey player and several other games and programs. Here is the Link to see Windows application compatible database to Wine for Linux.
Download WineHQ for Linux
See: Install Wine on Ubuntu or Linux Mint To Run Window Apps
_______________________________________________________________________________
Play on Linux
Playonlinux is a nice alternative to WineHQ for Linux to run Windows apps on Linux. It is also free and open source program, thus, we don’t need to buy any kind of license to use Play on Linux. There are numerous apps and games of Windows that are supported by it.
To run windows program it uses a Wine compatibility layer and provides a graphical user interface at the front for user convenience. PlayonLinux has been written in Python language and it provides wrapper shell scripts to specify the configuration of Wine for any particular software.
Apart from Linux, it can be used on MacOS and FreeBSD to run programs like Adobe Acrobat Reader DC, Microsoft Office 2016, Age Of Empires III, Assassin’s Creed Revelations and more. However, there is no surety that it will run the one too which you want to be on Linux. Thus, see the complete PlayOn Linux Windows app supported list- here.
Besides PlayonLinux, it also offers PlayonMac to run windows apps on MacOS.
Download PlayOnLinux
_______________________________________________________________________________
Crossover for Linux, MacOS & ChromeOS
Crossover is a best alternative to WineHQ and PlayOnLinux to run Windows app on Linux, MacOS and ChromeOS. However, unfortunately, it is not an open source program and users have to shell out some to use it. The crossover developed by CodeWeavers under a proprietary license to make Linux and Mac OS X operating systems Windows program compatible.
Crossover is an x86 compatible PC system software that requires at least 200 MB of free disk space for its own installation and space for installing Windows applications. It officially supports Ubuntu, Mint, Fedora, Debian and Red Hat Enterprise Linux (RHEL) Linux operating systems.
Besides Linux, you can download it from Google Play store on your ChromeOS running Notebook.
With CrossOver Mac, we can launch Windows applications directly from the dock, seamlessly integrate with your Mac and Linux system functions for cross-platform copy-and-paste and file interworking.
Well! being a paid software its support to run windows programs on Linux or MacOS will also be good. One year license cost of Crossover is $15.95 USD.
It easily installs and runs some Windows software some of them are: Microsoft office 2016, Enterprise Architect, World Warcraft, Adobe Dreamweaver, Adobe Photoshop 7.0/CS4, and more. See the Crossover Windows application compatibility Database.
No doubt, the CrossOver is really a strong contender in this list, however, still, if you are looking for CrossOver free & best alternative then Wine and PlayOnLinux always come in mind, first.
Download free trial of 14 days of CrossOver.
_______________________________________________________________________________
[alert-announce] Few other important apps need to know for running Windows apps on Linux or MacOS [/alert-announce]
Q4Wine- Qt GUI for Wine
Q4Wine is a Qt GUI for the Wine compatibility layer. Means the work of this tool is to provide an easy to use graphical user interface to manage Wine prefixes and its installed applications. Q4Wine is available for on Linux, FreeBSD and OS X platforms.
It features Qt colour theme into wine colours settings; work with different wine versions at the same time; control wine process; Autostart icons support; extract icons from PE files (.exe .dll); and more…
Get Q4Wine
_______________________________________________________________________________
Wineskin for Mac
Wineskin is a tool to run Windows programs but only for Mac OS X. It is a porting tool that ports Windows application to normal Mac apps and works as a wrapper around the Windows software. It is free to use and currently works on OS X 10.6 Snow Leopard, OS X 10.7 Lion, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks and OS X 10.10 Yosemite.
Get Wineskin
_______________________________________________________________________________
Winebottler
Winebottler is another tool that dedicated to run Windows-based programs on MacOS only. It builds using the open source tool Wine and it works as packager which ports the Windows application by packaging them to MacOS compatible. For example, some audio player is only meant for Windows, then you can use WineBottler to pack it for MacOS.
It is a very handy tool which with one click uses a script to configure, download and install Windows EXE app for MacOS. However, it is true for each and every application, as every software has its own shortcomings.
Get WinBottler