How to Install WINE on Ubuntu: Run Windows Apps

How to Install WINE on Ubuntu and Run Windows Apps on Linux. Have you ever needed to run a Windows program on your Linux machine? WINE is a powerful compatibility layer that enables Linux users to seamlessly run Windows executable (.exe) files. By bridging the gap between Windows and Linux, WINE makes it possible to use essential Windows software, tools, and even some games directly from your Linux desktop.

In this guide, we’ll show you step-by-step how to install and use WINE on Ubuntu, so you can get started running your favorite Windows applications with ease.

How Does WINE Work and Why Is It Not an Emulator?

WINE, which stands for "WINE Is Not an Emulator," differs from traditional emulators by translating Windows API calls directly into POSIX calls. This real-time translation eliminates the performance overhead of emulation, allowing Windows applications to run smoothly and efficiently on your Linux desktop without creating a virtual Windows environment.
YUMI running from WINE on Ubuntu

Installing WINE Using the Universal Repository

Follow these steps to install WINE on Ubuntu using the Universal repository:

  1. Open a terminal by pressing Ctrl+Alt+T.
  2. Enable 32-bit architecture support by entering:
    sudo dpkg --add-architecture i386 && sudo apt update
  3. Add the Universal repository:
    sudo add-apt-repository universe
  4. Update the package list and install WINE with recommended packages:
    sudo apt update && sudo apt install --install-recommends wine32 winetricks

After completing these steps, you can verify the installation by checking your WINE version:

wine --version

Additionally, configure WINE by running:

winecfg

Installing WINE Using the WineHQ Repository

If you want the latest version of WINE for Ubuntu, follow the official method from WineHQ. This method also installs the "Wine Windows Program Loader." Here’s how:

  1. Open a terminal by pressing Ctrl+Alt+T.
  2. Enable 32-bit architecture support:
    sudo dpkg --add-architecture i386
  3. Create a keyring directory:
    sudo mkdir -pm755 /etc/apt/keyrings
  4. Import the WineHQ repository key:
    sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
  5. Add the appropriate repository for your Ubuntu version:
    • For Ubuntu 22.04 (Jammy Jellyfish):
      sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
    • For Ubuntu 23.04 (Lunar Lobster):
      sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources
  6. Install WINE with the following command:
    sudo apt update && sudo apt install --install-recommends winehq-stable -y

How to Run Windows Applications with WINE

Once installed, you can start running Windows applications. Here are two common methods:

1. Using the Graphical Interface

To run an executable file from the graphical interface:

  1. Locate the Windows executable (.exe) file in your file manager.
  2. Right-click the file and select Open with Wine Windows Program Loader.

Install WINE on Ubuntu

2. Using the Terminal

If the "Wine Windows Program Loader" isn’t included (as in the Universal repository installation), you’ll need to use the terminal. Open a terminal window (Ctrl+T) and use the following commands to run your Windows executables:

  1. To run a Windows executable:
    wine filename.exe
  2. To execute a batch file:
    wine cmd /c filename.bat
  3. To run an executable in a console window:
    wineconsole filename.exe

That's it! With WINE installed, you can now run your favorite Windows applications on Linux from the terminal or via right click. Enjoy exploring the seamless integration between Linux and Windows software!