In this article, we want to teach you How To Install and Use Wine on Centos 7.
Wine (Wine Is Not an Emulator) Software that runs Windows applications under Linux and Unix on an x86 PC. It runs Windows executables intact, trapping calls from the application to the Windows interface, converting them as necessary, and directing them to X Window routines that do the processing.
Unlike virtual machine software such as Parallels and VMware Fusion, Wine does not require a copy of the Windows OS to be installed.
How To Install and Use Wine on Centos 7
Before you start to install Wine on Centos 7, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article the Initial Server Setup with Centos 7.
Now follow the steps below to complete this guide.
Steps To Install WineHQ on Centos 7
First, you need to update your local package index with the following command:
sudo yum update -y
Install Development Tools on Centos 7
Then, you need to install the development tools to compile and build new packages on Centos 7:
sudo yum -y groupinstall 'Development Tools'
Now you need to install the required packages with the following command:
sudo yum install libX11-devel freetype-devel zlib-devel libxcb-devel libxslt-devel libgcrypt-devel libxml2-devel gnutls-devel libpng-devel libjpeg-turbo-devel libtiff-devel gstreamer-devel dbus-devel fontconfig-devel
Next, switch to your tmp directory:
At this point, you need to visit the WineHQ Downloads Page to check the latest release of Wine.
Download Wine on Centos 7
Then, use the wget command to download the Wine tar.xz file on Centos 7:
Extract your source file:
tar -xvf wine-7.4.tar.xz -C /tmp/
Wine uses different applications depending on whether you have a 32-bit or 64-bit OS. If you are not sure which one is running on your system, use the following command to find out:
Output Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 2 NUMA node(s): 1 ...
In my case, is 64-bit as shown above.
Compile and Build Wine on Centos 7
Next, you need to compile and build the Wine installer on Centos 7.
On 32-bit systems, run the following commands:
# cd wine-7.4/ # ./configure # make # make install
On 64-bit systems, install Wine with:
# cd wine-7.4/ # ./configure --enable-win64 # make # make install
This will take some time to complete.
At this point, you can verify Wine installation on Centos 7 with the commands below.
To check the Wine version on 32-bit systems, run:
To check the Wine version on 64-bit systems, use:
How To Use WineHQ
To start using Wine on Centos 7, include the executable program in the path you type in the terminal. The command to run Wine will differ based on whether you have a 32-bit or 64-bit system.
On 32-bit systems, enter the following to run Wine:
# wine notepad
# wine c:\windows\notepad.exe
On 64-bit systems, run Wine with the command:
# wine64 notepad # Wine64 c:\windows\notepad.exe
How To Remove Wine from Centos 7
To uninstall Wine on CentOS 7, use the following command:
sudo yum erase wine
At this point, you learn to Install and Use Wine on Centos 7.
Hope you enjoy it.
You may be like these articles:
How To Install WineHQ on Ubuntu 22.04