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 on March 30, 2020 Linux Switching from Windows Tweet Share Email If you migrated to Linux, you might wonder about those Windows apps you depend on. There's a tool called WINE, which enables computer programs developed for Microsoft Windows run on Linux. Not every Windows application runs under WINE, but many do. How Does WINE Work? 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 program 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 seamlessly. To find out what Windows applications work on Linux, via WINE, check out the WINE Application Database. Here's how to install WINE on Ubuntu Desktop 19.04 and then install the Notepad++ application. Install WINE The first task is to install WINE. The installation isn't 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 You may get a message like, "Package 'wine' has no installation candidate. Try using the sudo apt-get install wine-stable -y command instead." To install the latest version of WINE, run: sudo apt install wine-development -y When prompted, type your user password. Wait while the installation runs. Wine has a decent number of dependencies. That's it. WINE is installed and ready to go. Use Wineconfig to Set Up WINE Next, set up the proper WINE environment. WINE needs a directory that is configured so it can fool the installers into thinking the applications are 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. Your Linux machine may need to install other software, called dependencies, before it can install WINE. Follow the prompts and agree to the steps. When the WINE Configuration tool opens, click the Drives tab, then make sure C: exists and it's target folder is ../drive_c. This should be created by default. Leave the WINE Configuration tool open. Configure WINE for Notepad++ Installing the Windows app can be done quickly from the command line, but first, make sure WINE has all the configuration information necessary. To do this, follow these steps: Open a web browser, download the .exe installer for Notepad++, and save it to the Downloads directory. From the WINE Configuration window, click Applications and then click Add application. Select the Look in drop-down arrow, choose your username, then select Downloads. Choose npp.7.7.1.Installer.exe, then select Open. Select the Windows Version drop-down arrow, then choose Use global settings. Select OK. Install Notepad ++ At this point, you can now install the application. In the terminal window, change to 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 the entire set of numbers and dots in a filename like this. After you change the directory to Downloads, enter wine npp, then press the Tab key on the keyboard. If you're in the right directory and the file is there, it automatically expands and types the full file name. Press the Enter key when it does so. Choose your desired language for the app, then select OK. Select Next. Select I Agree. Select Next. Choose the extra components you want, then select Next. It's perfectly fine to leave these options as is and click Next. Select Install. Allow the installation to complete, then select Finish. Notepad++ opens and is ready to be used. You have installed your first Windows app on Linux, using the compatibility layer WINE. Run the Application There is one caveat to installing applications through WINE—how to start the app. Upon the initial installation, the application automatically starts. If you can't figure out how to relaunch the application or if the desktop launcher doesn't work, you'll need 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++, then double-click the notepad++.exe entry. Use the application. When you finish using the application, close it as usual. When you need it again, open the WINE File Manager and launch it. Although this might not be the simplest method to run Windows applications (nor is every Windows application supported), having these apps running on a secure and reliable platform (Linux) is a great way to have the best of both worlds.