Classic SysAdmin: How to Install and Use Wine to Run Windows Applications on Linux
The Linux Foundation | 30 April 2022
Back in the mid 90s and early 00s, Linux, being a fledgling operating system, suffered from a severe lack of useful applications. This issue was especially critical in the world of business ─ where Windows desktop applications could make or break productivity. To overcome this weakness, a compatibility layer called WINE was created. The name originally stood for Wine Is Not an Emulator (because everyone mistook the tool for a Windows emulator). The name is now simply Wine.
Effectively, what Wine did was to allow Windows applications to run on the Linux platform. It wasn’t perfect, and the supported apps were limited. If you wanted Notepad, Calculator, or Solitaire…you were good to go.
But then something interesting happened. Over time more and more applications were supported until Wine became a must-have tool for many users and businesses (and especially Linux gamers). To date there are thousands of fully supported applications that now run on Wine (check out the application database for a full list) and that list is ever growing. Granted most of the Wine work is focused on games, but you’ll still find a healthy list of productivity apps available.
You might think, because of the complexity of bringing such a tool to life, that Wine would be complicated to install and use. That assumption would be incorrect. In fact, the developers of Wine have gone out of their way to make the compatibility layer as user-friendly as possible. What exactly does that mean? To make this easier, let’s walk through the process of installing Wine and then installing and running a Windows application with the tool.
I will demonstrate the process on Elementary OS Freya and install the latest version of Wine.
If you are running an Ubuntu derivative, you’ll find Wine located in the Software Center. Chances are, however, that version is outdated. Because of that, we want to avoid installing the “out of the box” version offered. To do this, we must add the official Wine repository. This can be done one of two ways, via command line or GUI. Since our goal is running Windows applications, let’s use the GUI method.
Click on the Applications menu
Click Software & Updates
Click on the Other Software tab
Enter ppa:ubuntu-wine/ppa in the APT line section (Figure 2)
Click Add Source
Enter your sudo password
When prompted, click Reload
Open the Software Center
Search for Wine
Click the Wine entry and then click Install
Allow the installation to complete.
That’s it. Wine is now ready to help you install and run Windows applications. Remember, however, that not every application will work. Most will, but if you’re looking to get your in-house, proprietary solution up and running, you might hit a few snags.
Installing and running an app
Let’s install a very popular programmers notepad—Notepad++. You’ll want to download the file from a location that doesn’t include third-party app install options (which can cause the application installation to fail). To be safe, download the Notepad++ installer from Filehippo. You will find .exe file for Notepad in your Downloads directory. Right-click that file and select Open in Wine Windows Program Loader (Figure 3).
Upon first run, the Wine configuration for ~/.wine will be updated. This can, depending upon the speed of your machine, take a bit of time. Allow this to finish and then the all-too-familiar Windows installation wizard will start up and walk you through the installation of Notepad++.
Click Next and walk through the installation process. When the second screen pops up (Figure 4), you will notice a rather un-Linux Folder path.
Linux doesn’t contain a C drive as does Windows. Is this wrong? No. If you look in the ~/.wine folder, you will notice a folder called drive_c. Within that folder lies three familiar sub-folders:
As you might expect, this is your C drive. All of that is to say, leave the Folder path as-is during installation.
You will eventually come to the Choose Components section of the installation (Figure 5). Here you can select options for the installation. If your particular desktop environment allows desktop icons (and that is your preference for launching apps), you might want to select Create Shortcut on Desktop (to make the launching of the newly installed app easier—more on this in a moment).
The installation will complete and present you with the Finish screen. Leave the Run Notepad box checked and click Finish. Notepad++ will run (Figure 1).
What happens, if you didn’t add the app icon to your desktop, when you want to run the software again? This is one issue that can easily trip users up. Remember that Program Files sub-directory? If you venture into that folder, you’ll see a folder for Notepad++ which contains the notepad++.exe file. Guess what? Right-click that file, select Open in Wine Windows Program Loader, and Notepad++ will run.
Notepad++ is a simple example of how Wine works. When you dive into more complicated applications, your results may vary. The best thing to do is to go back to the Wine application database, locate the app you want to install, click on it, and check the current app status. You will find every app lists the version of Wine tested, if it installs, if it runs, and gives it a rating. There are:
Platinum: Applications which run flawlessly out of the box.
Gold: Applications which run with some modifications necessary.
Silver: Applications which run with minor issues that do not affect usage.
You will also find some apps listed as Garbage, which means they won’t install and/or run.
If you have a Windows app that simply doesn’t have a Linux equivalent, never fear ─ Wine is here to assist you. Even though not every Windows app will run under Wine, the collection of apps that do is seriously impressive. And considering most everything we do nowadays is handled within a web browser, with a little help from Wine, you should be covered from every angle.
Ready to continue your Linux journey? Check out our Essentials of Linux System Administration course!
Cloud Computing Compliance and Security Projects Linux How-To Diversity & Inclusion Open Source Best Practices Events Cross Technology Training and Certification 2022 Blockchain Research LFX Legal Networking and Edge Data Governance LF Energy LF Research Open Source System Administration