Wine - Running Windows Software
After switching from Windows to Ubuntu, you may find that some of your commonly used Windows software has no Linux version. Wine was created to solve this problem — it lets you run Windows applications directly on Linux without installing a virtual machine or dual-booting.
What Is Wine
Wine (Wine Is Not an Emulator) is not an emulator or virtual machine, but a compatibility layer. It re-implements Windows APIs (Application Programming Interfaces), making Windows programs “think” they are running on Windows while actually executing natively on Linux.
This means:
- No Windows license required
- Near-native performance (since it’s not running in a virtual machine)
- Not all Windows software runs perfectly (compatibility depends on Wine’s API implementation)
Installing Wine
Installing the Stable Version
The Ubuntu official repository provides a stable version of Wine:
# Enable 32-bit architecture support (many Windows programs are 32-bit)
sudo dpkg --add-architecture i386
# Update package list
sudo apt update
# Install Wine
sudo apt install wine64 wine32
# Verify installation
wine --versionInstalling the Staging Version (Recommended)
Wine Staging includes the latest experimental patches and generally offers better compatibility:
# Enable 32-bit architecture
sudo dpkg --add-architecture i386
# Download and add WineHQ repository 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 WineHQ repository (Ubuntu 26.04 codename is resolute; using lsb_release matches it dynamically)
sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources"
# Update and install
sudo apt update
sudo apt install --install-recommends winehq-staging
# Verify installation
wine --versionWine Initialization
When running Wine for the first time, it automatically creates a default Windows environment:
# Initialize Wine (creates the ~/.wine directory)
wineboot
# Open Wine configuration tool
winecfgwinecfg lets you set:
- Windows version (Windows 10 or Windows 11 recommended)
- Graphics and audio drivers
- Per-application configurations
Winetricks Installation and Usage
Winetricks is a helper tool for Wine, used to install Windows runtime components, fonts, and common libraries. Many Windows programs require these components to run properly.
# Install Winetricks
sudo apt install winetricks
# Open graphical interface
winetricks --guiCommon Winetricks Components
# Install common fonts (fixes display issues)
winetricks cjkfonts
winetricks fakechinese
# Install Visual C++ runtime libraries
winetricks vcrun2019
winetricks vcrun2022
# Install .NET Framework
winetricks dotnet48
# Install DirectX
winetricks d3dx9
winetricks dxvk
# Install Windows core fonts
winetricks corefonts
# Install Windows components
winetricks msxml6
winetricks riched20
# Set Windows version
winetricks win10If you encounter font rendering issues (characters appearing as boxes) when running a Windows program in Wine, first try winetricks cjkfonts. If the problem persists, you can manually copy Windows fonts (such as simsun.ttc, msyh.ttc) to the ~/.wine/drive_c/windows/Fonts/ directory.
WINEPREFIX Management
WINEPREFIX is a core concept in Wine. Each WINEPREFIX is an independent Windows environment (like an independent C: drive), with its own registry, program files, and configuration.
Why Use Separate WINEPREFIXes
- Different programs may require different Windows versions or dependency libraries
- Configuration changes for one program won’t affect others
- You can easily remove a program without affecting others
- Easy to back up and migrate
Creating and Using
# Default WINEPREFIX is at ~/.wine
# Create a separate WINEPREFIX for a specific program
WINEPREFIX=~/wine-apps/myapp wineboot
# Run winecfg in a specified WINEPREFIX
WINEPREFIX=~/wine-apps/myapp winecfg
# Install Winetricks components in a specified WINEPREFIX
WINEPREFIX=~/wine-apps/myapp winetricks cjkfonts vcrun2019
# Run a program in a specified WINEPREFIX
WINEPREFIX=~/wine-apps/myapp wine /path/to/setup.exe
# Create a 32-bit WINEPREFIX (required by some older programs)
WINEARCH=win32 WINEPREFIX=~/wine-apps/old-app wineboot
# Delete a program (simply remove the WINEPREFIX directory)
rm -rf ~/wine-apps/myappCommon Wine Commands
# Run a Windows executable
wine program.exe
# Run an MSI installer
wine msiexec /i program.msi
# Open Wine's file explorer
wine explorer
# Open Wine's registry editor
wine regedit
# Open Wine's notepad
wine notepad
# Open Wine's task manager
wine taskmgr
# Kill all Wine processes
wineserver -kCommon Windows Software Compatibility
Here is the compatibility status of some common Windows software under Wine:
| Software | Compatibility | Notes |
|---|---|---|
| Good | Use a separate WINEPREFIX, install cjkfonts | |
| Fair | New QQ has a native Linux version, recommended to use directly | |
| Enterprise WeChat | Fair | Basic functions work, some features may be unstable |
| Microsoft Office | Fair | Office 2016 and below have better compatibility; LibreOffice or WPS recommended as alternatives |
| Adobe Photoshop | Poor | Older versions may work; GIMP or Krita recommended as alternatives |
| Notepad++ | Excellent | Runs perfectly |
| 7-Zip | Excellent | Runs perfectly, but Linux has native alternatives |
| WinRAR | Excellent | Runs perfectly |
| Various small tools | Varies | Simple utility software generally has good compatibility |
You can check specific software compatibility ratings and installation guides on Wine AppDB .
Native Linux Alternatives
Before trying to run Windows software with Wine, check if a native Linux version or quality alternative exists:
| Windows Software | Linux Native Alternative |
|---|---|
| Microsoft Office | LibreOffice, WPS Office (has Linux version) |
| Adobe Photoshop | GIMP, Krita |
| Notepad++ | Kate, Geany, VS Code |
| QQ Linux Edition (official) | |
| WeChat Linux Edition (official, Electron-based) | |
| Thunder (Xunlei) | Motrix, aria2 |
Bottles - Graphical Management Tool
If you prefer not to manage Wine from the command line, Bottles is an excellent graphical Wine management tool with a modern interface for creating and managing Wine environments.
Installing Bottles
# Install via Flatpak (recommended)
flatpak install flathub com.usebottles.bottles
# Run Bottles
flatpak run com.usebottles.bottlesAdvantages of Bottles
- Graphical interface: Create, configure, and manage Wine environments without the command line
- Environment templates: Pre-configured “Gaming”, “Application”, and “Custom” templates
- Dependency management: One-click installation of vcrun, dotnet, dxvk, and other dependencies
- Version management: Choose different Wine runner versions
- Backup and restore: Easily back up and restore Wine environments
- Runner switching: Supports Wine, Wine-GE, Proton-GE, and other runners
Basic Bottles Workflow
- Open Bottles and click “Create New Bottle”
- Choose the environment type (Application, Gaming, or Custom)
- Enter a name and select a Wine runner version
- After creation, click “Run Executable” to install a Windows program
- Manage installed programs within Bottles
Wine vs Proton
Wine and Proton can both run Windows programs on Linux, but they have different focuses:
- Wine is a general-purpose Windows compatibility layer, suitable for running various Windows applications (office software, tools, chat apps, etc.)
- Proton is developed by Valve based on Wine, specifically optimized for games. It integrates DXVK (converts DirectX to Vulkan), VKD3D (DirectX 12 support), and other game-related components
- Proton is used through Steam — just enable “Steam Play” in Steam settings to run Windows games directly
- If you want to run Windows games, prioritize Steam + Proton
- If you want to run Windows applications, use Wine or Bottles
For more gaming-related content, check ProtonDB for game compatibility reports.
Common Troubleshooting
Display Issues
# Install fonts
winetricks cjkfonts
# If problems persist, manually copy fonts
cp /path/to/simsun.ttc ~/.wine/drive_c/windows/Fonts/
cp /path/to/msyh.ttc ~/.wine/drive_c/windows/Fonts/Program Errors or Crashes
# Run the program from terminal to see error messages
wine /path/to/program.exe
# Enable debug output
WINEDEBUG=+all wine program.exe 2> debug.log
# Try a different Windows version
winecfg # Modify in the Applications tab
# Try installing missing dependencies
winetricks vcrun2019 dotnet48Resolution and DPI Issues
# Open winecfg
winecfg
# Adjust DPI settings in the Graphics tab
# Or modify via registry
wine reg add "HKCU\Control Panel\Desktop" /v LogPixels /t REG_DWORD /d 144 /fResetting Wine Environment
If the Wine environment has serious problems, the simplest solution is to delete and recreate it:
# Delete the default Wine environment
rm -rf ~/.wine
# Re-initialize
wineboot
winecfgWhile Wine cannot guarantee that all Windows software will run perfectly, it works well enough for many common applications. With graphical tools like Bottles, the experience continues to improve. If a particular program simply cannot run under Wine, consider using a virtual machine (such as GNOME Boxes or VirtualBox) as a fallback.