common.topBar.messagecommon.topBar.ctatop-bar-close-icon
articleSlug.creditBanner.imgAltarticleSlug.creditBanner.cta

How to Install Wine on Ubuntu 22.04

tutorials
How to Install Wine on Ubuntu 22.04

Discover How to Uninstall Wine From Ubuntu 22.04

Wine is an essential tool for running Windows applications on Linux-based systems like Ubuntu 22.04. With Wine, users can access a range of Windows programs and games directly on their Ubuntu machine.

This guide provides step-by-step instructions to install Wine on Ubuntu 22.04.

sudo apt update

Updating Your System

To ensure compatibility and performance, update your package list with the command above.

sudo apt upgrade -y

Upgrading Installed Packages

Upgrade existing packages to the latest versions to maintain system efficiency.

sudo dpkg --add-architecture i386

Enabling 32-bit Architecture

Execute this command to enable 32-bit architecture, allowing the installation of 32-bit Windows applications on your 64-bit Ubuntu system.

sudo mkdir -pm755 /etc/apt/keyrings

Creating a Directory for Keyrings

Create a dedicated directory for storing security keys or keyrings.

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

Downloading the Wine Repository Key

Use this command to download the repository key to your keyrings directory.

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

Adding the Wine Source File

Download and add the Wine repository source file to your system.

sudo apt update

Refreshing the Package List

Update your package list to incorporate new installations.

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

Installing Wine Stable Version

With these preparations complete, install the stable Wine package using the above command.

wine --version

Verifying Wine Installation

Check the installed Wine version to ensure it was installed correctly.

Uninstalling Wine From Ubuntu 22.04

To completely remove Wine, follow these steps:

sudo apt purge wine winehq-stable -y

Uninstall Wine Stable

Completely remove the Wine package with this command.

wine --version

Confirming Uninstallation

Verify the removal of Wine by checking its version. A "No such file or directory" message confirms uninstallation.

Conclusion

Following these steps allows you to install or uninstall Wine on your Ubuntu 22.04 system with ease. Utilize the command sudo apt install --install-recommends winehq-stable -y to install the package efficiently.

FAQs

What is Wine?

Wine is a compatibility layer that allows you to run Windows applications on Linux and other Unix-like operating systems.

How do I install Wine on Ubuntu 22.04?

Install Wine on Ubuntu 22.04 using the command sudo apt install wine.

How do I check the installed Wine version?

Use the command wine --version to check the installed version.

How do I run a Windows application with Wine?

Run a Windows application using the command wine /path/to/application.exe.