How to Use Wine on Linux

Learn via video courses
Topics Covered

Overview

Wine is a compatibility layer which is used to run Windows applications on POSIX-compliant systems. This includes not only Linux but also macOS and all BSD variants. Wine stands for a recursive acronym 'Wine is not an emulator'.

Wine Linux translates Windows API calls to POSIX-compliant system calls on-the-fly and so, we can run Windows-only applications on Linux.

Since Wine is not an emulator, it also does not come with the performance and memory penalty that we would encounter in the case of emulators.

How to Download Wine in Linux Operating System?

To first install Wine in Linux, we first need to determine the architecture of our system. This can be done by running the lscpu command. This is necessary since Wine supports both 32-bit and 64-bit architectures. Most modern systems now run 64-bit architecture processors.

checking system architecture with lscpu

  • Installing Wine Software using Ubuntu Repository We can install Wine on Ubuntu Linux using the apt package manager. Wine is packaged in Ubuntu's software repository.

    Before we install Wine, we first need to enable 32-bit architecture support on Ubuntu by running the command:

    To install wine, we run the command:

    After this, we can start by installing the 32-bit version of Wine by running the command:

installing the 32-bit version of wine on ubuntu linux

We can check the version of the installed wine Linux software by running: wine --version

checking the version of wine

  • Installing Wine on 64-bit System

    As most systems run a 64-bit processor, we can also install the 64-bit version of Wine to run modern applications efficiently.

    To install the 64-bit version of Wine, we can run the command:

    installing 64-bit wine on ubuntu linux

    We can check the version of the installed 64-bit wine Linux by running the command: wine --version

    checking the version

How to Use Wine?

Once we have installed Wine, we can use it to run Windows applications.

In this example, we are going to run the popular Windows note-taking application - Notepad++. The steps to run a Windows application using Wine Linux are:

  1. First we need to download a .exe for the application that we need to install or run on Linux using Wine. In this example, we are going to download and install Notepad++ which only runs on Windows. The .exe for Notepad++ can be downloaded from their website.

  2. Now we open a terminal. This can be any terminal emulator installed on your system. Open the terminal and navigate to the location where the .exe was downloaded using the cd command.

    moving to the directory

  3. Once in the directory, we use Wine Linux to run the application. To start the application installer, we run the command wine <name-of-installer>.exe. In this case, we run wine npp.8.5.4.Installer.x64.exe

    running the installer

  4. Follow the on-screen instructions to complete the installation of the software.

  5. Once installed, software usually creates a desktop entry which can be run on the normal Ubuntu application launcher. In case it is not created, we can also run the application from the terminal by moving to the location of the application and running it using Wine.

    navigating to the location

  6. Once in the location, we run the application by running: wine <name-of-executable>.exe. In this case, it is notepad++.exe.

    running notepad++

Conclusion

  • Wine Linux is a compatibility layer used to run Windows applications on POSIX-compliant systems. This includes Linux, macOS and BSDs.
  • Wine is not an emulation layer and so, it does not have the performance and memory penalty of emulators.
  • Wine supports both 32-bit and 64-bit systems.
  • Wine supports a wide variety of applications and it is now possible to even game on Linux using wine.