Wine is an open-source compatibility layer used to run Windows-based applications on Linux systems, including Ubuntu. The Wine acts as a bridge between the Windows and Linux APIs and translates Windows API calls into the native Linux system calls. This process enables the Linux system to run a wide range of Windows applications directly.
Running Windows applications on the newly installed Ubuntu 24.04 system will help users enhance their system versatility. Whether you are running legacy software or exploring new tools, with Wine, you can make it happen on your Ubuntu system.
This blog covers:
- How to Install Wine on Ubuntu 24.04
- How to Use Wine on Ubuntu 24.04
- How to Remove Application from Wine on Ubuntu 24.04
- How to Update Wine on Ubuntu 24.04
- Bonus Method: How to Install Winetricks on Ubuntu 24.04
- How to Remove Wine and Wine Repository from Ubuntu 24.04
- Conclusion
How to Install Wine on Ubuntu 24.04
To install Wine on Ubuntu 24.04, add the winehq repository to your Ubuntu system and install the application from the apt install command. To perform the Wine installation on Ubuntu 24.04 through the winehq repository, follow the below-given steps to complete the installation:
Step 1: Enable Kernel Architecture
If you are using 64-bit kernel architecture on Ubuntu, you must enable the 32-bit architecture so that you can handle both 32-bit and 64-bit applications seamlessly.
To check for the current kernel architecture on Ubuntu, you can use the below-given command:
dpkg --print-architecture
The output amd64 ensures that we are using 64-bit kernel architecture on Ubuntu.
Now, add the 32-bit kernel architecture (i386) on Ubuntu using the following command:
sudo dpkg --add-architecture i386
To verify that 32-bit kernel architecture is enabled on your system, run the below-given command:
dpkg --print-foreign-architectures
Step 2: Add Wine GPG Key
The next step is to verify the winehq repository, this can be possible by adding the GPG key to the system. Before that, create directory keyrings in the /etc/apt location using the following command for storing the GPG keys:
sudo mkdir -pm755 /etc/apt/keyrings
Then add the winehq GPG key to Ubuntu through the following command:
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Step 3: Add Wine Repository
Once you added the GPG key, it is time to add the winehq repository to the Ubuntu standard repository list using the following command:
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources
Step 4: Update Ubuntu Repository
To ensure the winehq repository is successfully added, you must update the repository list using the below-provided update command:
sudo apt update
Step 5: Install Wine on Ubuntu
Once the Wine repository is successfully added, you can install Wine on Ubuntu from the apt install command. There are three Wine versions, you can install on Ubuntu, whose details are provided below:
Wine Stable (winehq-stable): The current stable version of Wine, which is well-tested and reliable, makes it a good choice for running Windows applications on Ubuntu. However, it may lack some new features and some new applications may not work.
Wine Development (winehq_devel): This is the development version of Wine, which allows new software or applications to work with it. However, with new application support, you may find it hard to run older applications because they might not be compatible with this version. It is a must-pick choice for Ubuntu users who want to try new Wine features on their systems.
Wine Staging (winehq-staging): This is an experimental version of Wine that contains bug fixes and features that are not integrated into the main Wine’s development branch. The goal of introducing this version is to allow developers to discuss and improve their patches in the hunt to improve the application’s speed.
By May 23, 2024, the Wine Stable version has not been released yet, thus, you will not be able to install the Wine Stable version on Ubuntu until then. You may try running the below-given command to check whether the Wine Stable version can be installed on your system or not.
sudo apt install --install-recommends winehq-stable -y
If you are unable to install the Wine Stable version on Ubuntu, you can install the Wine development version using the below-provided command:
sudo apt install --install-recommends winehq-devel -y
Note: If you want to install Wine staging on Ubuntu 24.04, use the following command to install it:
sudo apt install --install-recommends winehq-staging -y
Step 6: Confirm Wine Installation on Ubuntu
To confirm Wine version is successfully installed on Ubuntu, use the below-provided command:
wine --version
Step 7: Configure Wine on Ubuntu
After you complete the Wine installation on Ubuntu, use the winecfg command to open the Wine configuration:
When you run Wine for the first time, it will update the Wine configuration. During this process, you will receive a prompt that needs your approval to install the Wine Mono Installer on the system. Simply use the Install button to begin installing Wine Mono Installer:
When the installation setup is completed, the Wine Configuration window will open on your desktop. There, you can select your desired Windows version so that Wine will be able to run applications that are compatible with the selected Windows version:
How to Use Wine on Ubuntu 24.04
To use Wine on Ubuntu 24.04, you will need a Windows-compatible exe or msi file so that you will be able to run it on your Ubuntu system through Wine. For example, we downloaded the PuTTY.exe file on our Ubuntu system. PuTTY is a widely used application for Windows that allows you to SSH into the system using the server’s IP address.
To run the PuTTY.exe file on Ubuntu through Wine from the terminal, run the below-given command:
wine putty.exe
This will run the PuTTY exe file on your Ubuntu system:
To run a Windows-supported msi file on Ubuntu through Wine, you can use the wine msiexec command followed by the /i argument and the name of the msi file. As an example, we are running the putty-64bit-0.81-installer.msi file on Ubuntu through the below-given command:
wine msiexec /i putty-64bit-0.81-installer.msi
Besides that, you can also launch the Windows application from the GUI through Wine. It can be done by navigating to the exe file, right-clicking on the file, and choosing “Open with Wine Windows Program Loader”:
This will launch the application on your desktop:
How to Remove Applications from Wine on Ubuntu 24.04
If you want to remove the applications from Wine, you can do it by first opening the Wine Uninstaller from the command line using the below-given command:
wine uninstaller
Then select the application you want to remove from the Wine; once selected, click the Modify/Remove button:
Click the Install button:
Note: For the PuTTY case, the Install button will appear. However, you may find the Uninstall button in case you are removing a different application from Wine. Moreover, you can also install applications directly from the Wine Uninstaller by uploading them from your system.
The application will be removed from Wine once it is successfully uninstalled from the system:
How to Update Wine on Ubuntu 24.04
If the Wine developers release a new version in the near future, you can update it on Ubuntu by using the following command:
sudo apt upgrade winehq-version -y
Note: Replace the version in the above command with the Wine version you want to install on Ubuntu.
Bonus Method: How to Install Winetricks on Ubuntu 24.04
You can also install a tool called winetricks on your Ubuntu system that helps you in managing specific components and settings within the Wine layer. With Wine and Winetricks, you can work together to enhance the Windows applications experience on your Ubuntu system. The Winetricks downloads and installs the components that are required by the Windows applications, such as fonts, DLLs, and others. You can also launch winecfg directly from the Winetricks launcher and change your Wine settings according to your choice.
To install winetricks on Ubuntu, you can use the following command:
sudo apt install winetricks -y
After that, you can run winetricks on the terminal and install your required wineprefix on your system. It can be possible by selecting the wineprefix and click the OK button to install it on the system:
How to Remove Wine and Wine Repository from Ubuntu 24.04
To remove the Wine version from Ubuntu 24.04, you can use the apt autoremove command followed by the version you have installed on the system.
Since we have installed the Wine Development version on Ubuntu, we can completely remove it using the following command:
sudo apt autoremove winehq-devel -y
To remove the Wine repository winehq from Ubuntu, you can run the below-given command:
sudo rm /etc/apt/sources.list.d/winehq-noble.sources
Note: An older version of Wine can also be found in the Ubuntu standard repository; you can install the Wine version according to your system. For example, to install the Wine 64-bit version on Ubuntu, you can enter the following command:
sudo apt install wine64 -y
To install the Wine 32-bit version on Ubuntu, run the below-given command:
sudo apt install wine32 -y
Conclusion
Wine is a powerful tool used for running Windows applications on Linux systems, including Ubuntu 24.04. Wine can be installed on Ubuntu 24.04 by first adding the GPG key to the Ubuntu system for authentication. Then add the winehq repository and update the Ubuntu repository list. Once the repository is updated, the Wine can then be installed through the apt install command on Ubuntu. However, ensure installing the Wine version according to your choice. After successful installation, you can download a Windows application and run it on your Linux system with the wine command. You can also remove applications from Wine or update your Wine to ensure using the latest version.
Check our LinkedIn company page