Wine is a compatibility layer that allows you to run Windows applications on Linux without requiring a virtual machine or dual-boot setup. Whether you need to run productivity software, legacy business applications, or Windows-only games, Wine provides a practical solution for accessing Windows programs on your Ubuntu system. By the end of this guide, you will have Wine installed and configured, ready to run Windows executables directly from your Linux desktop.
Choose Your Wine Installation Method
Wine can be installed through Ubuntu’s default repositories or the official WineHQ repository. As a result, each approach offers different trade-offs between convenience and version currency.
| Method | Channel | Version | Updates | Best For |
|---|---|---|---|---|
| Ubuntu Default Repository | Ubuntu Packages | Distribution default | Automatic via apt upgrade | Users who prefer distro-tested packages |
| WineHQ Official Repository | WineHQ Builds | Latest stable, staging, or development | Automatic via apt upgrade | Users who need newer Wine releases |
For most users, the Ubuntu Default Repository method is recommended because it requires no additional repository configuration and receives security updates through standard system maintenance. Choose the WineHQ repository method only if you specifically need features or compatibility improvements from newer Wine releases.
The WineHQ repository currently provides packages for Ubuntu 22.04 LTS and 24.04 LTS. If you are running a different Ubuntu release, the Ubuntu Default Repository method remains fully compatible across all versions. Commands shown in this guide work identically on supported LTS releases.
Update Ubuntu Before Wine Installation
Before installing Wine, update your system to ensure you have the latest package information and prevent potential dependency conflicts during installation:
sudo apt update && sudo apt upgrade
Enable 32-bit Architecture Support
Many Windows applications, particularly games and older software, require 32-bit libraries. Since modern Ubuntu installations are 64-bit by default, you need to enable 32-bit architecture support to ensure Wine can run both 32-bit and 64-bit Windows programs. First, add the i386 architecture to your system:
sudo dpkg --add-architecture i386
After enabling 32-bit support, refresh the package cache so APT recognizes packages for the new architecture:
sudo apt update
Install Wine from Ubuntu Default Repository
The simplest approach installs Wine directly from Ubuntu’s official repositories. As a result, this method provides a stable, distribution-tested version that integrates seamlessly with your system’s package management. To install both 64-bit and 32-bit Wine packages along with the recommended dependencies, run:
sudo apt install wine64 wine32
Once the installation completes, verify Wine is working by checking the installed version:
wine --version
As a result, the output displays the installed Wine version, confirming that the installation succeeded:
wine-9.0 (Ubuntu 9.0~repack-4build3)
The version number varies depending on your Ubuntu release. Ubuntu 22.04 LTS includes Wine 6.0.3, Ubuntu 24.04 LTS includes Wine 9.0, and Ubuntu 26.04 LTS includes Wine 10.0.
Install Wine from WineHQ Official Repository
Alternatively, if you need a newer version of Wine than what Ubuntu provides, the WineHQ repository offers stable, staging, and development builds. However, this method requires adding the WineHQ repository to your system before installation.
Import the WineHQ GPG Key
First, download and install the WineHQ repository signing key to verify package authenticity:
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /usr/share/keyrings/winehq.gpg
Add the WineHQ Repository
Next, create the repository configuration file. This command automatically detects your Ubuntu version and includes both 64-bit and 32-bit architectures required for Wine packages:
cat <<EOF | sudo tee /etc/apt/sources.list.d/winehq.sources
Types: deb
URIs: https://dl.winehq.org/wine-builds/ubuntu
Suites: $(lsb_release -cs)
Components: main
Architectures: amd64 i386
Signed-By: /usr/share/keyrings/winehq.gpg
EOF
After adding the repository, refresh the package cache to make the WineHQ packages available:
sudo apt update
Then, verify that APT recognizes the WineHQ repository by checking the package availability:
apt-cache policy winehq-stable
Consequently, the output should show the WineHQ repository as the package source:
winehq-stable:
Installed: (none)
Candidate: 10.0.0.0~noble-1
Version table:
10.0.0.0~noble-1 500
500 https://dl.winehq.org/wine-builds/ubuntu noble/main amd64 Packages
Choose Your WineHQ Release Branch
WineHQ provides three release branches, each suited to different use cases:
Stable Branch
- Best for most users who want reliable performance
- Thoroughly tested with fewer bugs
- Updated less frequently (major releases every 1-2 years)
Staging Branch
- Contains experimental patches not yet in stable
- Better compatibility for some games and applications
- May have occasional stability issues
Development Branch
- Cutting-edge features and fixes
- Updated frequently (bi-weekly releases)
- Recommended only for testing or development purposes
Install WineHQ Stable
For most users, the stable branch provides the best balance of features and reliability. The --install-recommends flag ensures all recommended dependencies are installed for optimal performance:
sudo apt install --install-recommends winehq-stable
Install WineHQ Staging (Alternative)
Alternatively, if you need better game compatibility or experimental features, install the staging branch instead:
sudo apt install --install-recommends winehq-staging
Install WineHQ Development (Alternative)
For testing the latest Wine development code, use the development branch. However, keep in mind this version may be unstable:
sudo apt install --install-recommends winehq-devel
Verify WineHQ Installation
After installing your chosen WineHQ branch, verify the installation succeeded by checking the version:
wine --version
As a result, the output displays the WineHQ version number, which will be higher than the Ubuntu default repository version:
wine-10.0
Configure Wine
After installing Wine, run the configuration utility to set up the Wine environment. This process creates the necessary directory structure and downloads additional components like Mono, which Wine uses to run .NET applications:
winecfg
When you run winecfg for the first time, Wine prompts you to install Mono. Click “Install” to proceed with the download. Once complete, the Wine Configuration dialog appears where you can adjust settings such as the Windows version Wine emulates, graphics options, and audio configuration.

By default, the Windows version is typically set to Windows 7, but you can change this to Windows 10 for better compatibility with modern applications. Therefore, to change the Windows version, use the dropdown menu at the bottom of the Applications tab.

Install Winetricks for Additional Components
Furthermore, Winetricks is a helper script that simplifies installing Windows components, libraries, and fonts that many applications require. To install Winetricks, run:
sudo apt install winetricks
Once Winetricks is installed, you can easily add common Windows components. For example, to install all Microsoft core fonts, which many applications need for proper text rendering:
winetricks allfonts

Run Windows Applications with Wine
Once installed, Wine integrates with your desktop environment, allowing you to run Windows executables in several ways. Consequently, this section demonstrates running Windows programs using both graphical and command-line methods.
Run Applications from File Manager
The simplest way to run a Windows application is to right-click on an .exe file in your file manager, select “Open With Other Application,” and choose Wine from the list. For instance, if you download the Notepad++ installer, you can run it directly through Wine to install the application.

After installation, Windows applications typically appear in your application menu under a “Wine” category. Additionally, you can find installed programs in your Wine prefix directory at ~/.wine/drive_c/Program Files/.


Run Applications from Terminal
Alternatively, to run a Windows executable from the terminal, use the wine command followed by the path to the program:
wine /path/to/program.exe
Similarly, for installed applications, you typically need to specify the full path within the Wine prefix:
wine ~/.wine/drive_c/Program\ Files/Notepad++/notepad++.exe
Wine Commands Reference
In addition to the main Wine command, Wine includes several command-line utilities for managing your Windows environment. Below are the most commonly used commands:
Wine Configuration
To open the Wine configuration dialog, run the following command to adjust settings like Windows version, graphics, and audio:
winecfg
Wine Registry Editor
Similarly, you can access the Wine registry editor for advanced configuration and troubleshooting:
wine regedit
Winetricks Component Manager
Additionally, use Winetricks to install additional Windows components, libraries, or fonts. Running without arguments opens the graphical interface:
winetricks
Alternatively, specify components directly. For example, to install Visual C++ 2019 runtime libraries:
winetricks vcrun2019
Wine Path Converter
Furthermore, you can convert between Windows-style and Unix-style paths using the winepath utility:
winepath -w ~/.wine/drive_c
As a result, this returns the Windows-style path, which is useful for scripts that need to work with both path formats:
C:\
Wine Server Control
If Wine applications become unresponsive, you can forcefully terminate the Wine server. Consequently, this stops all running Wine processes:
wineserver -k
Configure a 32-bit Wine Prefix
In some cases, older Windows applications require a 32-bit Wine environment. Therefore, to create a separate 32-bit Wine prefix, set the appropriate environment variables before running winecfg:
export WINEARCH=win32
export WINEPREFIX=~/.wine32
winecfg
As a result, this creates a new Wine prefix at ~/.wine32 configured for 32-bit Windows applications. Subsequently, you can use this prefix for specific applications by setting the WINEPREFIX environment variable before running them.
Update Wine
Typically, Wine updates automatically through your system’s package manager. However, to manually check for and install Wine updates along with other system packages, run:
sudo apt update && sudo apt upgrade
Alternatively, to update Wine specifically without upgrading other packages, use:
sudo apt install --only-upgrade wine
Remove Wine
If you need to remove Wine from your system, the process depends on which installation method you used.
Remove Wine from Ubuntu Default Repository
First, to uninstall Wine installed from Ubuntu’s default repository, run the following commands:
sudo apt remove wine32 wine64
sudo apt autoremove
Subsequently, the autoremove command cleans up packages that were automatically installed as dependencies and are no longer needed.
Remove WineHQ Packages
Similarly, to remove WineHQ packages, uninstall the specific branch you installed:
sudo apt remove winehq-stable
sudo apt autoremove
Alternatively, if you installed the staging or development branch instead, replace winehq-stable with winehq-staging or winehq-devel accordingly.
Additionally, after removing the packages, you can remove the WineHQ repository configuration and GPG key:
sudo rm /etc/apt/sources.list.d/winehq.sources
sudo rm /usr/share/keyrings/winehq.gpg
sudo apt update
Remove Wine User Data
Warning: The following commands permanently delete your Wine configuration, all Windows applications installed through Wine, and any documents, settings, or game saves stored within the Wine prefix. Back up any important data before proceeding.
Finally, to completely remove Wine user data, delete the Wine prefix directories and related cache files:
rm -rf ~/.wine ~/.wine32
rm -rf ~/.cache/wine
rm -rf ~/.local/share/applications/wine
rm -rf ~/.local/share/desktop-directories/wine*
Verify Wine Removal
After removing Wine, confirm the package is no longer installed by checking the command availability:
which wine
If Wine was successfully removed, this command produces no output. Additionally, you can verify that APT no longer shows Wine packages from external repositories:
apt-cache policy winehq-stable
Consequently, the expected output confirms that the WineHQ package is no longer available:
N: Unable to locate package winehq-stable
Conclusion
With Wine installed on your Ubuntu system, you can run Windows applications directly on Linux without virtualization overhead. Whether you chose the stable Ubuntu repository version or the latest releases from WineHQ, you now have a configured Wine environment ready for Windows software. For managing multiple Windows applications with different configuration requirements, consider using Bottles on Ubuntu, which provides a graphical interface for creating and managing separate Wine prefixes.
pooky you’re an idiot and probably should stay away from linux and stick with windows
the tee command outputs to BOTH your terminal AND to the listed winehq.list
Thanks for explaining how
teeworks. You are correct that it writes to both the terminal and the specified file simultaneously. That said, pooky’s observation was valid for their situation. If the pipe character was not copied correctly, theechocommand alone would only print to the terminal without creating the file.Everyone starts somewhere with Linux. Questions and reports like pooky’s help identify where documentation can be clearer. The article has since been updated to use a heredoc format that is less prone to copy-paste issues.
Hi, thanks for this tutorial!!!!
I finally have the installation clear and it works with Total Commander.
AGAIN, the echo command does NOTHING
Next, import the WineHQ repository using the following command:
echo deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main | sudo tee /etc/apt/sources.list.d/winehq.list.
It just ECHOES back exactly what you typed.
It does NOT import ANYTHING
Thanks for the feedback. The command you referenced was from an older version of the guide. It used a pipe (
|) to send the output tosudo tee, which writes the repository entry to the file. If you copied only theechoportion without the| sudo tee /etc/apt/sources.list.d/winehq.listpart, the command would just print the text to your terminal instead of creating the file.The article has since been rewritten to use the modern DEB822 format, which is clearer and less prone to copy-paste errors. The current method uses a heredoc block that creates the repository configuration in one step:
This format is now standard for Ubuntu 22.04 and newer. After running the command, you can verify the file was created with
cat /etc/apt/sources.list.d/winehq.sources.