How to Install Wine on Ubuntu

  • Post category:Ubuntu

Wine is a compatibility layer that enables you to run Windows applications on Unix-like operating systems, including Ubuntu. With Wine, you can install and use many popular Windows programs without needing a Windows license. In this guide, we will cover how to install Wine using both the default repositories and the WineHQ repository for the latest version.

Step 1: Update the Package Repository

Open Terminal

Press Ctrl + Alt + T to open the terminal.

Update Package List

Run the following command to ensure your package list is up to date:

sudo apt update

Step 2: Enable 32-bit Architecture

Wine requires 32-bit architecture support, especially on 64-bit systems.

Enable 32-bit Architecture

To enable 32-bit architecture, run:

sudo dpkg --add-architecture i386

Step 3: Add the WineHQ Repository

Download WineHQ GPG Key

Create a directory for keyrings and download the GPG key:

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

Add the WineHQ Repository

Next, add the appropriate repository for your version of Ubuntu (replace jammy with your version if necessary):

echo "deb [signed-by=/etc/apt/keyrings/winehq-archive.key] https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/winehq.list

Step 4: Install Wine

Update Package List Again

After adding the repository, update your package list again:

sudo apt update

Install Wine

To install the latest stable version of Wine, run:

sudo apt install --install-recommends winehq-stable

Alternatively, if you want to install the development version, use:

sudo apt install --install-recommends winehq-devel

Step 5: Verify Installation

Check Wine Version

To verify that Wine was installed correctly, run:

wine --version

Conclusion

By following these steps, you will have successfully installed Wine on your Ubuntu system, allowing you to run Windows applications seamlessly. For further configurations or troubleshooting, refer to the official Wine documentation.

Explore more guides and tutorials on software installation and management at CodeAllow.