How to Install Wine on Ubuntu 22.04

Wine is a third-party tool that helps you to operate Windows applications on Linux distributions including Ubuntu 22.04. With Ubuntu Wine, you can enjoy numerous Windows applications and games for free on your Ubuntu system.

Through this procedural guide, you can explore the process of installing Wine on your Ubuntu 22.04 system.

How to Install Wine on Ubuntu 22.04?

Here are the sequential instructions for installing Wine on your Ubuntu operating system.

Step 1: Update Your System

To avoid compatibility issues and improve the performance of your Ubuntu 22.04, run the update command to refresh the package list:

sudo apt update
sudo apt update

The command recommends that fifteen (15) packages need to be upgraded.

Step 2: Upgrade Installed Packages

You can use the below-mentioned command for upgrading the installed packages on your system:

sudo apt upgrade -y
sudo apt upgrade
sudo apt upgrade

Once the upgrading process is finished, all of your system packages will be upgraded to the latest release.

Step 3: Enable 32-bit Architecture

Enabling the 32-bit architecture is necessary if you want to use Wine on a 64-bit Ubuntu system. Thus, executing the provided command allows you to install and run 32-bit Windows applications through Wine:

sudo dpkg --add-architecture i386 
sudo dpkg --add-architecture

No output after executing the commands indicates that the 32-bit architecture has been successfully enabled on your machine.

Step 4: Create a Directory for Keyrings

You can create a dedicated folder, such as keyrings, for storing security keys or keyrings on your local machine:

sudo mkdir -pm755 /etc/apt/keyrings
sudo mkdir -pm755

Step 5: Download Wine Repository Key

The following command is essential for downloading the Wine repository key to the keyrings directory:

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -O

After running the above command, you will notice a key “winehq-archive.key” saved to the dedicated directory. 

Step 6: Add the Wine Source File

Utilize the below command to download and add the Wine repository source file to your local machine: 

sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo wget -NP

After executing the command, the completion report will be displayed on your terminal.  

Step 7: Refresh Package List

Run the update command to refresh your Ubuntu package list and update with the new installations:

sudo apt update
sudo apt update

Step 8: Install Wine Stable Version

Upon completing the above steps, your system is now ready to install the Wine package. Simply, use the command from the terminal to begin the installation process of Wine (stable) on your Ubuntu system:  

sudo apt install --install-recommends winehq-stable -y
sudo apt install
sudo apt install

During the installation, if you didn’t encounter any errors, it indicates that you have successfully installed the Wine package on your Ubuntu 22.04.

Step 9: Verify Wine Installation

You can confirm the installation of the Wine package through the command:

wine --version
wine --version

After using the above command the release number of wine, such as wine-9.0 will appear on your terminal screen. 

With the help of the aforementioned process, you have successfully installed Wine on your Ubuntu 22.04 system.

How to Uninstall Wine from Ubuntu 22.04?

Completely remove the Wine package from your Ubuntu 22.04 system through the following process.

Step 1: Uninstall Wine Stable

Run the command if you want to completely remove the Wine package:

sudo apt purge wine winehq-stable -y
sudo apt purge wine
sudo apt purge wine

In your terminal, you can notice the process of removing the package files. 

Step 2: Confirm Wine After Uninstallation

You can verify the removal of Linux Ubuntu Wine by using the following command:

wine --version
wine --version

If the command returns “No such file or directory”, it indicates that Wine is no longer available on your Ubuntu 22.04 system.

Conclusion

You can install the Wine package on your Ubuntu 22.04 machine through simple procedural steps. Start the installation process by adding 32-bit architecture, downloading keyrings, and the Wine source file. Finally, install utilize the command sudo apt install –install-recommends winehq-stable -y to install the wine package. 

 

For those seeking absolute control over their virtual private server, Ultahost unmanaged VPS hosting is the ideal choice. Establish a dependable and skilled in-house team to oversee and maintain your VPS independently, without depending on Ultahost’s services.

FAQ

What is Wine?
How do I install Wine on Ubuntu 22.04?
How do I check the installed Wine version?
How do I run a Windows application with Wine?

Related Post

How to Install OpenCV on Ubuntu

OpenCV, short for Open Source Computer Vision Library, ...

How to Create and Setup a Cron Job in Ubuntu

You will be wondering what is cron job? Cron is a time-...

How to Install Chromium on Ubuntu 22.04

Chromium is an open-source web browser project that ser...

How to Install Apache Cordova on Ubuntu

For mobile and web developers, creating hybrid applicat...

How to Install Git on Ubuntu

Git is an important tool on Ubuntu for both development...

How to Check Ubuntu Version via Terminal and

Understanding your Ubuntu version is important for stay...

Leave a Comment