Some applications are only available for Windows, but we’d like to run them on a Linux system as well. As a result, Linux developed a compatibility layer named “WineHQ” (not an emulator) that allows you to run windows-only applications on UNIX operating systems like Linux, macOS, and FreeBSD. Every window application will not run on Linux, but if they do, they will behave differently than they will on Windows. It also includes “Winelib”, a software library that allows developers to compile Windows applications on other operating systems. “WineHQ” converts window system calls into the corresponding POSIX calls by using a UNIX-like operating system.
“WineHQ” is a very versatile Linux application, and there are two simple ways to install it:
- Installing wineHQ via Ubuntu software repository
- Installing wineHQ via wine build repository
Installing “wineHQ” Via Ubuntu Software Repository
Ubuntu software repository is the most preferred method to install the stable version of “wineHQ”. It is available in 32bit and 64bit architecture.
Use the given command to determine which architecture is present in your system:
It shows that X86_64 architecture is in your system.
Before installing the new package, it is strongly advised to update your package list:
When updating process gets completed, you need to upgrade your packages list:
To install both 32bit and 64bit packages on your system, you need to enable the “multiarch”. Also, update the packages:
When the “multiarch” has been enabled, you can install the recommended version of “wineHQ” by using the command:
To continue with the installation, press “Y”.
“WineHQ” has been installed. To determine the version of “WineHQ” that is currently installed, use:
Installing “wineHQ” Via Wine Build Repository
The second method to install “wineHQ” is through the wine build repository. However, before doing so, you must uninstall all wine packages, including wine-mono, if they are already installed.
There are no “wineHQ” packages available in my system.
To install “wineHQ” on both 32bit and 64bit architecture, you must enable “multiarch” with the command:
Adding Repository Key
To download the “wineHQ” repository key and import it to the system, execute the given command:
Now, enable the repository on your system:
Again, use the command below in updating packages:
Let’s install “wineHQ” on your system, we have three versions of wineHQ:
For Stable wineHQ
To install the most stable and recent version of “wineHQ”, use:
If you want to continue the installation process, hit “Y”, otherwise “N”.
For Developing wineHQ
This version of “wineHQ” is preferred by the majority of developers, but it may not be as stable. Execute the command to install it:
When you press “Y”, the installation process will proceed.
For Staging wineHQ
Use the command to install the staging version of “wineHQ”:
Once the installation is completed, ensure the installation by checking the version of “wineHQ”:
The most recent version of “wineHQ” has been installed successfully.
Configuring Wine:
To configure the “wine”, type “winecfg” in your terminal:
Mono packages will be installed as well with this command. A dialog box will appear on the screen, asking whether you want to install the “Wine Mono packages” or not; click “install”.
To configure the wine environment, a wineHQ configuration dialogue box will appear. If you want to change the window edition, choose “window version” from the drop-down menu.
Now, you can install any Windows application on Linux.
Installing Notepad on Linux Using Wine
Let’s install “Notepad ++” which is a Windows exclusive application on Linux.
First, you need to download the “.exe” file of “Notepad ++” from the GitHub repository, copy the mentioned command and paste it in terminal:
Now that the”.exe” file has been downloaded, use “wine” to install it:
After selecting a language and clicking “OK“, the “Notepad ++” installer will appear. To continue, click “Next”.
Choose the location where you want to save this file; click “Next” to continue.
Click “Install”.
Once the installation is completed, Hit “Finish”.
Launching “Notepad++”
To launch the “Notepad++”, type “notepad++” in the applications search bar.
Alternatively, you can open “notepad++” by using the command line.
A preloaded file will open.
Notepad has successfully been installed on the Linux system.
Removing “wineHQ” from Your System
Using the “purge” command, you can remove the “wineHQ” application and all of its packages from your system:
“WineHQ” has been removed from your system.
Conclusion
“WineHQ” is a compatibility layer that assists you to run window-only applications on UNIX-like operating systems as well. We’ve shown you how to install “wineHQ” from the Ubuntu software repository and the “WineHQ” build repository in this post. We have focused on how to delete it from your system when you no longer need it. In addition, we have installed “Notepad ++” in Linux, which is a simple text editor and runs on a Windows operating system.