Software & Apps Linux How to Install and Use Wine to Run Windows Apps on Linux You can still use those Windows programs you know and love By Jack Wallen Writer Jack Wallen is a former Lifewire writer, an award-winning writer for TechRepublic and Linux.com, and the voice of The Android Expert. our editorial process LinkedIn Jack Wallen Updated February 07, 2020 Linux Switching from Windows Tweet Share Email If you’ve migrated to Linux, you might be wondering about some of those Windows apps you depend on. Fortunately, there is a tool called WINE, which lets computer programs developed for Microsoft Windows to run on Linux. Not every Windows application will run under WINE, but many do. How Does WINE Work? Effectively, WINE is a set of libraries that function together to enable Windows applications to install and run on Linux. One portion of WINE, which is “visible” to Windows applications, is the Windows Application Programming Interface (API). The other portion, which is visible to Linux, is a combination of the Linux and X11 (the Linux graphic display server) APIs. WINE also includes a special Windows programs loader, which enables it to “see” a .exe file (a Windows executable file), load it (along with its required Windows files), and connect everything together. It’s a rather complicated layering of tools, but in the end, it works pretty seamlessly. Supported Applications To find out what Windows applications work on Linux, via WINE, check out the WINE Application Database. We’re going to walk you through the process of installing WINE on Ubuntu Desktop 19.04 and then installing the venerable Notepad++ application. Installing WINE The first task to undertake is the installation of WINE itself. Believe it or not, although this might seem like it should be rather difficult, the installation isn’t at all challenging. Here’s how to successfully install WINE on Ubuntu Desktop 19.04: Open the terminal window application from the GNOME Dash. Install WINE with the command: sudo apt install wine -y It's possible you'll get a message like "Package 'wine' has no installation candidate. Try using the sudo apt-get install wine-stable -y command instead. If you'd prefer the latest version of WINE, run: sudo apt install wine-development -y When prompted, type your user password. The installation will run. Wine has a decent number of dependencies, so be patient. That’s it; WINE is installed and ready to go. Wineconfig The next thing to be done is setting up the proper WINE environment. WINE needs to have a directory configured such that it can fool the installers into thinking the applications are being installed in a standard Windows directory, (such as the C: drive). Here’s how you do that: From the terminal window, issue the command winecfg. It's possible that your Linux machine will need to install other software, called dependencies before it can fully install Wine. Follow the prompts and agree to the steps as they show up. When the WINE Configuration tool opens, click on the Drives tab and make sure C: exists and it’s target folder is ../drive_c. This should be created by default. Leave the WINE Configuration tool open. Configuring WINE for Notepad++ Installing the Windows app can be done quickly from the command line, but we want to first make sure WINE has all the configuration information necessary. To do this, follow these steps: Using your browser, download the .exe installer for Notepad++ and save it into your Downloads directory. From within the WINE Configuration window, click Applications and then click Add application. From the Look in drop-down, select your username and then choose Downloads. Select npp.7.7.1.Installer.exe and press Open. From the Windows Version drop-down, select Use global settings if it hasn't already been selected. Press OK. Installing Notepad ++ At this point, you can now install the application. Back at the terminal window, change into the Downloads directory with the command cd ~/Downloads. Install the app with the command wine npp.7.7.1.Installer.exe. You don't have to type out the entire complex set of numbers and dots in a filename like this. Once you've changed directory to Downloads, simply type "wine npp" and then hit the Tab key on your keyboard. If you're in the right directory and the file is there, it will automatically expand and type the full file name for you. Simply hit Enter/Return when it does so. Select your desired language for the app, and press OK. Press Next. Select I Agree. Press Next. Select any extra components you might want, and press Next. It's perfectly fine to just leave all these options as is and click Next. Press Install. Allow the installation to complete, and press Finish. Notepad++ should then open, ready to be used. Congratulations, you have installed your first Windows app on Linux, thanks to the compatibility layer WINE. Running the Application There is one caveat to installing applications through WINE—how to start the app. Upon the initial installation, the application will automatically start. After closing the app, you might find yourself unable to figure out how to relaunch the application. Even the desktop launcher might not work. What do you do? You turn to yet another tool. Installed along with WINE is an application called WINE File Manager. From that tool, you can navigate to the directory housing the installed application and launch it. Here’s how: From a terminal window, issue the command winefile. Navigate to C > Program Files (x86) > Notepad++ and double-click the notepad++.exe entry. Use the application. Once you’ve finished using the application, close it as per usual. When you need it again, open the WINE File Manager and launch it. Although this might not be the simplest method of running Windows applications (nor is every single Windows application supported), having these apps running on a secure and reliable platform (Linux) is a great way of having the best of both worlds.