Wine
lastmod 2026-03-25created 2014-02-1954 edits
Wine is a compatibility layer for running Microsoft Windows-only programs on Unix-like operating systems.
About
Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, Mac OSX, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.
How to install
ArchLinux
On ArchLinux, you need to enable the multilib repository.
If you use Internet Explorer:
If you use .NET:
Ubuntu
Search for installable packages:
You get a list like this:
- wine/jammy,jammy,now 6.0.3~repack-1 all [installed,automatic] - Windows API implementation - standard suite
- wine-binfmt/jammy,jammy 6.0.3~repack-1 all - Register Wine as the interpreter for Windows executables
- wine-development/jammy,jammy 6.0+repack-1ubuntu1 all - Windows API implementation - standard suite
- wine-stable/jammy,jammy,now 3.0.1ubuntu1 all [installed] - Windows API implementation (transitional package)
- wine32/jammy,now 6.0.3~repack-1 i386 [installed,automatic] - Windows API implementation - 32-bit binary loader
- wine32-development/jammy 6.0+repack-1ubuntu1 i386 - Windows API implementation - 32-bit binary loader
- wine32-development-preloader/jammy 6.0+repack-1ubuntu1 i386 - Windows API implementation - prelinked 32-bit binary loader
- wine32-development-tools/jammy 6.0+repack-1ubuntu1 i386 - Windows API implementation - 32-bit developer tools
- wine32-preloader/jammy 6.0.3~repack-1 i386 - Windows API implementation - prelinked 32-bit binary loader
- wine32-tools/jammy 6.0.3~repack-1 i386 - Windows API implementation - 32-bit developer tools
- wine64/jammy,now 6.0.3~repack-1 amd64 [installed,automatic] - Windows API implementation - 64-bit binary loader
- wine64-development/jammy 6.0+repack-1ubuntu1 amd64 - Windows API implementation - 64-bit binary loader
- wine64-development-preloader/jammy 6.0+repack-1ubuntu1 amd64 - Windows API implementation - prelinked 64-bit binary loader
- wine64-development-tools/jammy 6.0+repack-1ubuntu1 amd64 - Windows API implementation - 64-bit developer tools
- wine64-preloader/jammy 6.0.3~repack-1 amd64 - Windows API implementation - prelinked 64-bit binary loader
- wine64-tools/jammy 6.0.3~repack-1 amd64 - Windows API implementation - 64-bit developer tools
- winetricks/jammy,jammy 0.0+20210206-2 all - simple tool to work around common problems in Wine
For now, install the stable version and winetricks:
winecfg
A GUI configuration tool for Wine; you can start it by running winecfg.
On first install, it installs packages such as mono for .NET and geko for Embedding HTML.
regedit
The registry editing tool of Wine; you can start it by running regedit. See WineHQ's article on useful registry keys.
control
An implementation of the Windows Control Panel for Wine, which you can start by running Wine control.
For the full list, see WineHQ's list of commands.
How to kill all wine processes
You can force-kill them with:
Rebooting wine
How to remove everything
Completely remove Wine packages and settings:
sudo apt purge --autoremove wine wine64 wine32 winetricks winehq-stable winehq-staging winehq-devel -y
sudo apt autoremove -y
Remove Wine user data:
# Wine prefix (설치된 Windows 앱, DirectX, .NET 등 모두 포함)
rm -rf ~/.wine
# 추가 Wine prefix가 있다면
rm -rf ~/Games # Lutris 등에서 생성한 경우
# Wine 관련 설정/캐시
rm -rf ~/.local/share/wine
rm -rf ~/.local/share/applications/wine*
rm -rf ~/.local/share/desktop-directories/wine*
rm -rf ~/.local/share/icons/hicolor/*/apps/wine*
rm -rf ~/.config/menus/applications-merged/wine*
rm -rf ~/.cache/wine
rm -rf ~/.cache/winetricks
Check for custom prefixes:
# WINEPREFIX 환경변수 확인
grep -r "WINEPREFIX" ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null
# 용량 큰 Wine prefix 찾기
find ~ -name "drive_c" -type d 2>/dev/null
If you also used Lutris, PlayOnLinux, etc.
Deleting ~/.wine is the key — every Windows component installed through Wine, such as DirectX, .NET Framework, and fonts, lives there.
Fonts
If Wine applications do not show easily readable fonts, the fonts may not be installed. To easily link all system fonts so that wine can access them:
cd ${WINEPREFIX:-~/.wine}/drive_c/windows/Fonts
find /usr/share/fonts/ -iname '*.otf' -o -iname '*.ttf' -exec ln -s {} \;
Installing and configuring NanumGothic
sudo apt install fonts-nanum
cd ${WINEPREFIX:-~/.wine}/drive_c/windows/Fonts
dpkg -L fonts-nanum | grep --color=never -i '\.ttf$' | xargs -i ln -s {}
sed -i 's/"MS Shell Dlg"="Tahoma"/"MS Shell Dlg"="NanumGothic"/' ~/.wine/system.reg
sed -i 's/"MS Shell Dlg 2"="Tahoma"/"MS Shell Dlg 2"="NanumGothic"/' ~/.wine/system.reg
Displaying Korean fonts
- Fixing broken Korean fonts in Wine (1.6.2) on Lubuntu
- When Korean text in Wine shows up as boxes or barcodes
Download fonts with winetricks. (Check the ~/.wine/drive_c/windows/Fonts folder.)
In the ~/.wine/system.reg file, the "MS Shell Dlg" entry is probably set to Tahoma. Change it to Gulim.
Restart wine:
Change the environment variable to LANG=ko_KR.utf8.
Either the method above, or
setting FontSubstitute in the registry to NanumGothic still works. The path is:
Winetricks
Winetricks is a script that can install the basic requirements needed to run Windows programs. Installable components include DirectX 9.x, MSXML (required by Microsoft Office 2007 and Internet Explorer), the Visual Runtime libraries, and more.
Optional dependencies for wine
- giflib
- lib32-giflib
- libpng
- lib32-libpng
- libldap
- lib32-libldap
- gnutls
- lib32-gnutls
- mpg123
- lib32-mpg123
- openal
- lib32-openal
- v4l-utils
- lib32-v4l-utils
- libpulse
- lib32-libpulse
- alsa-plugins
- lib32-alsa-plugins
- alsa-lib
- lib32-alsa-lib
- libjpeg-turbo
- lib32-libjpeg-turbo
- libxcomposite
- lib32-libxcomposite
- libxinerama
- lib32-libxinerama
- ncurses
- lib32-ncurses
- opencl-icd-loader
- lib32-opencl-icd-loader
- libxslt
- lib32-libxslt
- gst-plugins-base-libs
- lib32-gst-plugins-base-libs
- vkd3d
- lib32-vkd3d
- sdl2
- lib32-sdl2
- libgphoto2
- sane
- gsm
- cups
- samba
- dosbox
Wine Application Database (AppDB)
minit (Game)
Installed:
- d3dcompiler_42
- d3dcompiler_43
- d3dcompiler_46
- d3dcompiler_47
- d3dx10
- d3dx11
- d3dx9
How it works
Wine is a compatibility layer that makes Windows programs runnable on POSIX-compatible OSes (Linux, macOS, BSD)
Valve's Steam Deck also uses a Wine-based solution
=== WINE = Wine Is Not an Emulator ===
- Emulation is slow, and Linux/macOS can in fact run Windows binaries natively (with a little help)
- Detailed explanation, using a debugger, of how Linux/Windows binaries work
Hello, Wine!
- Basically, Wine is a "Dynamic Loader" for Windows executables
- It is a native Linux binary that knows how to handle EXEs and DLLs
- Wine reads a Windows executable into memory, parses it to work out its dependencies, and jumps to the code to be executed
- This alone is enough to run Windows binaries, but there are exceptions
System Calls
- System calls, called syscalls, are what make Wine complicated
- syscalls are implemented in the OS, not contained in executables or libraries
- The syscalls provided by the OS are the OS API
- Linux: read, write, open, brk, getpid,..
- Windows: NtReadFile, NtCreateProcess, NtCreateMutant,..
- On Linux, calling read() requires putting the file descriptor in register %rdi, the buffer pointer in %rsi, and the number of bytes to read in %rdx
- But Windows has no read() function in the kernel
- Linux calls puts from libc.so, Windows calls printf from ucrtbase.dll
- On Linux these days it is common to link statically, including the puts implementation in the binary, so libc.so is not used at run time
- Ordinary applications always rely on kernel32.dll/kernelbase.dll/ntdll.dll and never talk to the kernel directly
Runtime translation of Syscalls
- What if we intercept syscalls?
- What if, when the application calls NtWriteFile(), we step in, call write(), and return the result in the format the binary expects?
- Providing a custom version of ucrtbase.dll would make this possible, but it causes complicated problems
- Instead, modify ntdll.dll, which sits between the binary and the kernel
- Recent versions of Wine consist of ntdll.dll (PE binary) and ntdll.so (ELF binary)
- The dll is a thin layer that simply redirects calls to the ELF side
- The ELF has a special function called __wine_syscall_dispatcher that works the magic of converting the current stack from Windows to Linux, or vice versa
- It handles calling conventions, allocates stack space, moves registers, and so on
- Once execution reaches ntdll.so and passes into the Linux binary, we can use the whole Linux API
That's all?
- It sounds very easy, but..
- The Windows API is enormous, poorly documented, and has known/unknown bugs that must be preserved as they are. Most Wine code is implementations of various Windows DLLs
- There are many ways to make syscalls, and technically there is no way to stop applications from calling syscalls directly
- (Remember that Windows games do all kinds of crazy things)
- The Linux kernel has a special mechanism to handle this, which of course adds complexity
- The 32bit vs 64bit issue is also nonsense. There are countless 32-bit games, and they will not be re-released as 64-bit. Wine supports both, which also adds complexity
- wine-server has not even been mentioned here. It is a separate process created by Wine that maintains kernel "state" (file descriptors, mutexes, etc.)
- Want to run games? You have to handle DirectX, PulseAudio, input devices, and so on, which is a huge amount of work
Docker + Wine
- Running a windows server with docker-wine
- scottyhardy/docker-wine: Docker image that includes Wine and Winetricks for running Windows applications on Linux and macOS
- tobix/wine - Docker Image
- KakaoTalk#Docker + Wine + Kakaotalk
Troubleshooting
FATAL ERROR in Vertex Shader compilation
################################################################################
FATAL ERROR in Vertex Shader compilation
ShaderName: shdSwap
memory:67:22: error: syntax error, unexpected NEW_IDENTIFIER
at gml_Object_UberCont_Draw_77
################################################################################
Or:
################################################################################
FATAL ERROR in Vertex Shader compilation
ShaderName: shaderTemplate
D3DXCompile failed - result
at gml_Object_objControlerN_Draw_64
################################################################################
I installed the following:
- d3dcompiler_42
- d3dcompiler_43
- d3dcompiler_46
- d3dcompiler_47
- d3dx10
- d3dx11
- d3dx9
Call from 7B010BE6 to unimplemented function mfplat.dll.MFCreateTempFile, aborting
In KakaoTalk, clicking a profile throws this error...
Wine Mono is not installed
- (solved) How to install Wine Mono? - Linux Mint Forums
- Mono Package for Wine is not installed - Ask Ubuntu
- Index of /wine/wine-mono
Install Mono.
An Error has occurred while loading imports
See Winetricks#An Error has occurred while loading imports for details.
See also
- Windows Subsystem for Linux (WSL)
- Darling - MacOS compatibility layer for Liunx
- AnBox - Android compatibility layer for Linux
- Compatibility layer
- PlayOnLinux
- KakaoTalk - added how to install it on Linux.
- Valve Proton - fork of Wine developed by Valve
- Bottles - easily run Windows software on Linux
- MiceWine - run Windows apps and games on Android phones
- Winlator - Android app that runs Windows programs through Wine
- Bottles - Bottles lets you run Windows software such as applications and games on Linux. (like PlayOnLinux)
- WinBoat - seamlessly running Windows apps on Linux
- WineHQ
- Lutris - Open Gaming Platform
Favorite site
- wine web site
- Wine AppDB
- Wikipedia (en) Wine (software)
- Wine - ArchWiki
- Installing KakaoTalk on Ubuntu 18.04 LTS
- How to install DirectX in Linux using Wine 2
Articles
- Wine 11 rewrites how Windows games run on Linux at the kernel level, massive | GeekNews
- [Original] Wine 11 rewrites how Linux runs Windows games at the kernel level, and the speed gains are massive
- Completely redesigns how Windows games run on Linux at the kernel level, removing the synchronization bottleneck of the existing wineserver-based approach
- The new NTSYNC driver handles NT synchronization objects directly in the kernel, recording FPS gains of up to 8x or more
- With WoW64 complete, 32-bit Windows apps can run on 64-bit Linux without separate libraries
- Broader compatibility across graphics and I/O, including a stronger Wayland driver, Vulkan 1.4 support, and improved Bluetooth and Force feedback
- Performance and stability gains spread across the whole Wine-based ecosystem, including Proton, SteamOS, and Lutris