How to Install Wine on Ubuntu {Tutorial with Screenshots} (2025)

Introduction

Wine is a compatibility layer for Linux that allows you to run Windows programs on a Linux system. It translates Windows API calls into native Linux commands, enabling Windows programs to run seamlessly.

This tutorial teaches you how to install Wine on Ubuntu using two different repositories.

How to Install Wine on Ubuntu {Tutorial with Screenshots} (1)

Prerequisites

  • A user account with sudo or root privileges.
  • Ubuntu system (this tutorial uses Ubuntu 22.04).
  • Access to the terminal.

Install Wine from Ubuntu Repository

Installing Wine from the Ubuntu repository is helpful because it ensures you get a tested and optimized Wine version. The following text explains how to do this.

Step 1: Verify Ubuntu 32-bit or 64-bit system

Wine uses different configurations tailored for 32-bit and 64-bit versions of Ubuntu to ensure optimal compatibility and performance when running Windows applications on each architecture.

To view CPU details such as its architecture and capabilities, enter the lscpu command:

lscpu
How to Install Wine on Ubuntu {Tutorial with Screenshots} (2)

The CPU op-mode(s) field shows which architecture you are using:

  • CPU op-mode(s): 32-bit. The system has a 32-bit architecture.
  • CPU op-mode(s): 64-bit.The system has a 64-bit OS.
  • CPU op-mode(s): 32-bit, 64-bit. The system supports both.

In our example, the system supports both architecture types.

Step 2: Install Wine from Default Repositories

Installing Wine from the default Ubuntu repositories is the easiest option. To do so, follow these steps:

1. Update the apt repository package list. This ensures the latest stable Wine version is installed.

sudo apt update
How to Install Wine on Ubuntu {Tutorial with Screenshots} (3)

2. To install 64-bit Wine, enter:

sudo apt install wine64

To install 32-bit Wine, use the following command:

sudo apt install wine32

Step 3: Verify the Wine Version

After the operation completes, verify the installation by checking the running version:

wine --version
How to Install Wine on Ubuntu {Tutorial with Screenshots} (5)

Installing Wine from the official Ubuntu repository provides a stable install. However, the repositories often do not include the latest versions.

Install Wine From the WineHQ Repository

If you need a more recent Wine version, install it from the developers' repositories. The following text explains how to do it.

Step 1: Enable 32-bit Architecture

If you are using a 64-bit OS, enable the 32-bit architecture. This allows you to install and run 32-bit software, including libraries and applications. The process is necessary for Wine because many Windows applications, especially older ones, are designed for 32-bit systems.

sudo dpkg --add-architecture i386

The command has no output.

Step 2: Add the GPG Key

Add the GPG key to ensure the downloaded packages are from trusted sources and have not been tampered with.:

wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
How to Install Wine on Ubuntu {Tutorial with Screenshots} (6)

Step 3: Add the WineHQ Repository to Ubuntu

Run the following command to add the WineHQ repository to Ubuntu:

sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main'
How to Install Wine on Ubuntu {Tutorial with Screenshots} (7)

Note: This example uses Ubuntu 22.04. Replace jammy with your Ubuntu version (e.g., focal for Ubuntu 20.04).

Step 4: Install Wine

To install Wine, take the following steps:

1. Update the package lists:

sudo apt update

2. Install the latest stable Wine release using the command:

sudo apt install --install-recommends winehq-stable
How to Install Wine on Ubuntu {Tutorial with Screenshots} (8)

Alternatively, to install the latest development Wine release, use:

sudo apt install --install-recommends winehq-devel

Step 5: Verify the Installation

Verify the installation by running:

wine --version
How to Install Wine on Ubuntu {Tutorial with Screenshots} (9)

Unlike installing Wine from Ubuntu repositories, this method provides the latest Wine version.

How to Update Wine

To update wine, use the command:

sudo apt upgrade winehq-stable
How to Install Wine on Ubuntu {Tutorial with Screenshots} (10)

Replace stable with devel for the developer version. Stable releases come out every 10-12 weeks, while developer updates come out more frequently.

Get Started Using Wine

To set up the configuration directory for Wine, run the following command:

wineboot
How to Install Wine on Ubuntu {Tutorial with Screenshots} (11)

The command creates the Wine configuration directory, typically located at ~/.wine. This directory serves as the Wine C: drive equivalent, where Windows applications are installed and configured.

Launching Applications

If you're running a GUI on Ubuntu, right-click the .exe file you want to open, in this case, OfficeSetup.exe, and select Open With Wine Windows Program Loader.

How to Install Wine on Ubuntu {Tutorial with Screenshots} (12)

To launch the application from the command line, take the following steps:

1. Change the working directory to the OfficeSetup.exe location, in this case the Downloads directory:

cd ~/Downloads
How to Install Wine on Ubuntu {Tutorial with Screenshots} (13)

2. Run the OfficeSetup.exe file with Wine:

wine OfficeSetup.exe
How to Install Wine on Ubuntu {Tutorial with Screenshots} (14)

wine start Command

Unlike thewine command, wine start allowsWineto manage the working directory. It establishes a standard working directory (often the user's home directory) before application execution, ensuring accurate interpretation of file paths and resource access. This enables Windows programs to access files and resources as if operating in a Windows environment.

The benefits of using wine start are convenience and automation. The command handles the working directory for each application launched, making it more straightforward, especially when dealing with multiple applications or complex directory structures.

To launch a Windows application (OfficeSetup.exe in this example), run:

cd ~/Downloadswine start OfficeSetup.exe
How to Install Wine on Ubuntu {Tutorial with Screenshots} (15)

Note: Replace cd ~/Downloads and OfficeSetup.exe with the correct file path and name applicable to your case.

How to Uninstall Wine From Ubuntu

To uninstall Wine, use this command:

sudo apt remove wine[version]
How to Install Wine on Ubuntu {Tutorial with Screenshots} (16)

Instead of wine[version], use wine64, wine32, wine-stable or wine-dev depending on the version you have installed.

The command removes Wine but not its dependencies. To remove all unnecessary dependencies, run the command:

sudo apt autoremove
How to Install Wine on Ubuntu {Tutorial with Screenshots} (17)

Conclusion

This guide provided instructions for installing and running Wine on Ubuntu and showed how to remove Wine and its dependencies.

Next, read our comparison between Linux and Windows servers.

How to Install Wine on Ubuntu {Tutorial with Screenshots} (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Sen. Emmett Berge

Last Updated:

Views: 5945

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Sen. Emmett Berge

Birthday: 1993-06-17

Address: 787 Elvis Divide, Port Brice, OH 24507-6802

Phone: +9779049645255

Job: Senior Healthcare Specialist

Hobby: Cycling, Model building, Kitesurfing, Origami, Lapidary, Dance, Basketball

Introduction: My name is Sen. Emmett Berge, I am a funny, vast, charming, courageous, enthusiastic, jolly, famous person who loves writing and wants to share my knowledge and understanding with you.