WINE, which is short for 'WINE is not an Emulator ' (confusing, right ), is a free & open source application which allows us to install & run Microsoft windows based software, games etc on Linux/Unix-like machines. It acts as a compatibility layer for linux os to run windows softwares.
Wine is a must have tool on linux machines, especially for gamers who love Linux as the gaming support for high end games is very limited on linux.
In this tutorial we will learn to install Wine on CentOS/RHEL & Ubuntu. So let's start,
( Must Read : Installing PlayOnLinux on Ubuntu & CentOS )
Installing WINE on CentOS/RHEL using source packages
WINE on CentOS/RHEL is installed by compiling it from source packages, so firstly make sure that we have all the Development Tools installed on our machine. If the Development Tools are not installed on our machine, we can install them by executing the following yum command,
$ yum groupinstall 'Development Tools'
Once the these packages have been installed, we will install some more packages that are required for WINE,
$ yum install libX11-devel freetype-devel zlib-devel libxcb-devel
Next we will download the source packages for WINE. Though there are versions available upto 2.14 but those are development versions, latest stable WINE version in 2.0.2. To download 2.0.2, run the following command,
$ wget https://dl.winehq.org/wine/source/2.0/wine-2.0.2.tar.xz
After download is complete, we will extract the source package,
$ tar -xvJf wine-2.0.2.tar.xz -C /tmp
$ cd /tmp/wine-2.0.2
Now we will compile & install the WINE packages, please note that commands are bit different to configure the packages for 32 & 64 bit packages,
$ ./configure (for 32 bit systems)
$ ./configure --enabled-win64 (for 64 bit systems)
once the packages have been configured, run following commands
$ make install
That's it, wine is now installed on your machine. There is another way, you can install WINE on CentOS/RHEL & that way is by using the EPEL repository, process for which is detailed below,
Installing WINE on CentOS/RHEL using source packages using EPEL repository
We can easily install WINE with single command using EPEL but it does not have the latest wine stable releases, that's the advantage of installing WINE from source packages (you get the latest). To install WINE using EPEL repository, we will first install & enable EPEL repository on our machines, using
For Centos/RHEL 7
$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
CentOS/RHEL 6 64 bit
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
CentOS/RHEL 6 32 bit
$ rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
After installing EPEL repository, we will install wine by running,
$ yum install wine
This will install wine on the machine.
( Recommended Read : Simple guide on how to install steam on Linux )
Installation of WINE on Ubuntu
There are two ways that you can install latest version on WINE on Ubuntu, first way is by using source packages (same way we used for CentOS installation) but I can guess given the way second way is very easy, you are most likely to opt second option for installation i.e. by adding official repository & then installing WINE from the repository,
To add the official wine repository on Ubuntu, run
$ sudo add-apt-repository ppa:wine/wine-builds
$ sudo apt-get update
to update system of the repository & finally run the following command to install it on system,
$ sudo apt-get install winehq-devel
Now to run an application using wine (for both CentOS/RHEL & Ubuntu), download the .exe for the package to run. Then open terminal & run,
$ wine windows_app.exe
That will make the 'exe' to execute with wine application.
This complete our tutorial, if you have any queries or suggestions regarding this tutorial, please do mention them in the comment box below.