Sometimes it happens that we have to run Windows application on Linux. Sometimes we just want to play a game that has no support for Linux. To make this possible, we do not need to install a second system or configure a virtual machine. No! You don’t need to buy Windows to run few apps. The only thing you need is Wine.
Wine (recursive backronym for Wine Is Not an Emulator) is a free and open-source compatibility layer that aims to allow computer programs (application software and computer games) developed for Microsoft Windows to run on Unix-like operating systems.
There are three versions of Wine.
sudo apt-get install --install-recommends winehq-stable
sudo apt-get install --install-recommends winehq-devel
sudo apt-get install --install-recommends winehq-staging
In most cases you probably would like to use latest version so it’s Development branch.
For latest version in Ubuntu add repositories
In order to facilitate the configuration of Wine, the Winetricks script will also be useful, thanks to which we can easily change the Wine configuration and download/install various redistributable runtime libraries, packages and fonts.
sudo apt-get install winetricks
To configure wine we need to run command
These commands will create a default prefix located in your home user folder
/home/user/.wine. Check this location and then you will see similar folder structure to the one from Windows system. This is the place where all Windows software will be installed and stored.
They’re not virtual machines, but they do behave somewhat similarly.
The default WINE prefix is
~/.wine, but different and multiple prefixes can be used. Of course you can install all apps into one prefix but some apps require more system-wide edits like registry entries and .dlls to run, the potential for conflicts between these applications rises. It’s not all that common for programs running in Wine to break each other, but it does happen. This is especially true if you’re dealing with some 32bit applications on a 64bit WINE install.
To create new prefix run command
or for 32-bit architecture
WINEPREFIX=/home/user/.newprefix2 WINEARCH="win32" winecfg
winecfg at the end you can change with
winetricks, it depends how would you like to configure newly created prefix.
When creating a new Wine prefix, you will be asked if you want to download
wine-gecko components. For best compatibility, it is recommended to click Yes here.
To configure already created prefix run command
to configure default prefix just type
To show how install Windows software in Linux I will let you know how to install Notepad++ for example. Download latest version and use command.
or for the specific prefixe
WINEPREFIX=/home/user/.office WINEARCH="win32" wine ~/Downloads/npp.7.5.6.Installer.exe
Complete all the necessary steps in the installer, as in the standard installation on the Windows system, and thats all. Shortcut to application will be waiting in your start menu/desktop. To be honest once you have installed Wine and created default prefix you can just double click on downloaded installer and it will work in the same way as on Windows.
Some of programs may need additional dlls or packages which you can easily add using Winetricks.
Alos you can modify registry
If you would like to unsintall application just run Winetricks and choose Uninstall Software option which will allow you to uninstall any application from the installe software list.
Best example for more complex application is Office 2010 installation. Yes! You can have fully working Microsoft Office 2010 on Linux. First install winbind.
sudo apt-get install winbind
Then create 32bit prefix
WINEPREFIX=/home/user/.office WINEARCH="win32" winetricks
Install additional packages
corefonts and libraries
gdiplus. You can do it using Winetricks.
wincfg go to library tab and override
gdiplus to “Native”
Run installer. Once complete you will have fully working Windows 2010 under Linux.
There are also extensive graphical interfaces available on the market based on the Wine engine, which allows you to configure and install everything using windows.