How to Install Wine in Linux/Ubuntu

Wine is software that enables users to operate Windows programs on the Linux or Unix-based Operating System. Wine stands for “Wine Is Not an Emulator”. The working of Wine is alike an emulator yet it permits different techniques to extend performance. It transforms the system calls of Windows to POSIX (Portable Operating System Interface) system calls by utilizing Ubuntu, which is a Linux-based Operating System.

This blog will demonstrate two methods to install Wine in Ubuntu 22.04:

  • Method 1: Via the Ubuntu Repository
  • Method 2: Via WineHQ Repository

Method 1: How to Download/Install Wine in Ubuntu 22.04 Via Ubuntu Repository?

Ubuntu Repositories are servers that carry files which include programs and libraries for package setup. The Ubuntu Repository method is the most convenient way to install Wine. To start the installation of Wine in Ubuntu 22.04, try out the following below-mentioned steps:

  • View CPU Details
  • Install Wine from Default Packages
  • Check Wine Version

Step 1: View CPU Details

lscpu” is utilized to get the system/CPU details. Use the following command for installing Wine:

The output will show the architecture-supportive versions that can be either 32-bit or 64-bit. Below-highlighted box informs that our system supports both 32-bit and 64-bit versions :

Step 2: Install Wine from Default Packages

The easiest option for installing wine is from default packages/repositories. For that, first update the packages/repositories by using the below-listed command:

apt” is a tool used for application installations and management.

This will update all the existing packages:

Now, if the user wants to install a 32-bit version then this command will be used:

For a 64-bit version, we will utilize the below-listed command:

We will install the Wine 32-bit version whose output is shown below:

Step 3: Check Wine Version

Verify the wine version after installation by using this command:

It can be observed that the latest version of Wine has been installed successfully:

Method 2: How to Download/Install Wine in Ubuntu 22.04 Via WineHQ Repository?

Another method used to install Wine is using the WineHQ Repository. WineHQ Repository is the official repository provided by the Wine developers. To install Wine in Ubuntu 22.04 using WineHQ Repository, follow the below-provided steps:

  • Setup 32-bit Architecture
  • Update Repository
  • Add GPG Key with WineHQ Repository
  • Verify the Wine Version

Step 1: Setup 32-bit Architecture

The user needs to enable 32-bit architecture by using the below-listed command:

sudo dpkg –add-architecture i386

Here, the “dpkg” is a tool used for Debian Packages to be installed, removed, and managed. Also, “i386” is the 32-bit x86 and most supportive architecture. This will enable the 32-bit architecture:

Step 2: Update Repository

Update the packages list/repositories by using the same “update” command:

This will update all the new needed packages:

Step 3: Add GPG Key With WineHQ Repository

A “GPG” Key is a public key used for the verification of secure communication/transmission between two parties. The below-mentioned command will be used for adding the GPG Key for packages:

sudo wget -qO- | sudo apt-key add –

The “OK” message will be shown after adding the key:

Utilize the below-provided command further to add the WineHQ Repository:

sudo apt install software-properties-common

software-properties-common” is a software package used in Linux that hides the details of an already used apt repository/package.”software-properties-common” makes the process of editing, and removing packages more easier.

Now, add the Wine repository through the provided command:

sudo apt-add-repository “deb $(lsb_release -cs) main”

The output will show the addition of the Wine repository:

One more time, the need of updating packages are required after adding the Wine repository using the same update command:

Here, our packages are updated as shown in the output:

For installing the current stable latest version of Wine, the below-listed command should be used:

sudo apt install –install-recommends winehq-stable

Step 4: Verify the Wine Version

Lastly, check/verify the wine version after installation:

According to the below output, the latest version of Wine has been installed successfully:

We have demonstrated the efficient and well-structured methods to install Wine in Ubuntu 22.04.


To install Wine in Ubuntu 22.04 using the Ubuntu repository, the first step is to view the CPU details using the “lscpu” command. Then, update packages and install Wine by utilizing the “sudo apt install wine32s” command, and for verification, check the version using the “wine –version” command. Moreover, users can also use the WineHQ repository method for installing Wine. To do so, first set the architecture using “sudo dpkg –add-architecture i386”. After that, add the GPG Key to the WineHQ repository and check/verify the version.

Print Friendly, PDF & Email