What Wine Does and Why You Need It
Wine is a compatibility layer that lets you run Windows programs directly on Ubuntu without needing Windows itself. It translates Windows program instructions into commands your Linux system understands, so a .exe file that was built for Windows can run on your Ubuntu desktop.
Wine is not an emulator — it does not create a virtual Windows machine. Instead, it sits between your Windows program and Ubuntu's kernel, converting system calls in real time. This means Windows programs run faster through Wine than they would in a full virtual machine, though not every Windows program works perfectly.
You will find Wine useful if you have a specific Windows program you need — accounting software, a game, a legacy tool — but you want to use Ubuntu as your main operating system. Wine handles many common programs well, but before you install it, check whether your specific program is known to work by searching the WineHQ AppDB, a community database of tested programs.
Key Takeaways
- Wine installs from Ubuntu's standard software repositories using the apt package manager, and the whole process takes under five minutes on a modern connection.
- You will need the Windows program file (.exe) and may need to install additional libraries or dependencies depending on what the program requires.
- Not every Windows program works in Wine — check the WineHQ AppDB before you install to see whether your specific program is known to work and what configuration it needs.
- Wine creates a fake Windows environment in a hidden folder in your home directory, so each program can have its own separate configuration without affecting others.
- If a program does not work after installation, the most common fixes are installing the right version of Wine, adding missing libraries, or adjusting Wine settings through Winetricks.
Installing Wine From Ubuntu's Repositories
The simplest way to install Wine is through Ubuntu's built-in software repositories. Open a terminal — press Ctrl+Alt+T on most Ubuntu desktops — and type the following command:
sudo apt update
This refreshes your package list so you get the latest version. Then type:
sudo apt install wine wine32 wine64
Ubuntu will ask for your password. Type it and press Enter. The system downloads Wine and installs it, which usually takes two to five minutes depending on your internet speed. The wine32 and wine64 packages let Wine run both 32-bit and 64-bit Windows programs — most programs need one or the other, and some need both.
When the installation finishes, verify it worked by typing:
wine --version
You should see a version number like "wine-8.0" or similar. If you see "command not found", the installation did not complete — try the apt install command again.
Setting Up Your First Windows Program
Once Wine is installed, you need to place your Windows program file somewhere you can find it. Create a folder in your home directory called windows_programs — this keeps your .exe files organized and separate from your regular Ubuntu files.
Open your file manager, navigate to your home folder, right-click in an empty space, and select "Create Folder". Name it windows_programs. Then copy or download your .exe file into this folder.
To run the program, open a terminal, navigate to the folder, and type:
wine program_name.exe
Replace program_name.exe with the actual filename. Wine will create a hidden folder called .wine in your home directory — this is Wine's fake Windows environment, and you normally do not need to touch it. The program should launch, though it may take a few seconds longer than it would on Windows because Wine is translating instructions as it runs.
Installing Additional Libraries With Winetricks
Many Windows programs depend on libraries that do not come with Wine by default — things like .NET Framework, Visual C++ runtimes, or DirectX components. If your program crashes immediately or complains about missing files, you probably need to install one of these libraries.
First, install Winetricks, a helper tool that manages these dependencies:
sudo apt install winetricks
Then check the WineHQ AppDB page for your specific program — it usually lists which libraries that program needs. For example, if the page says "Requires .NET Framework 4.5", you would type:
winetricks dotnet45
Winetricks downloads and installs the library into your Wine environment. This can take several minutes for large libraries like .NET Framework. When it finishes, try running your program again.
If you are not sure which library you need, start with the most common ones:
- winetricks vcrun2019 — Visual C++ runtime, needed by many programs
- winetricks dotnet48 — .NET Framework, needed by some business and development tools
- winetricks d3dx9 — DirectX 9 components, needed by older games
Configuring Wine Settings for Your Program
Sometimes a program runs but behaves strangely — wrong colors, no sound, crashes when you click certain buttons. Wine has a configuration tool that lets you adjust how it behaves for each program.
Open a terminal and type:
winecfg
A window opens with several tabs. The most useful ones are:
Applications tab: Set which version of Windows your program thinks it is running on. Some programs are picky about this — if your program was written for Windows 7, set it to "Windows 7" here.
Graphics tab: Turn on or off features like "Emulate a virtual desktop" (which runs the program in a window instead of fullscreen) or "Allow the window manager to control the windows" (which lets you move and resize the window normally).
Audio tab: If sound is not working, check that the audio driver is set correctly — usually "PulseAudio" on modern Ubuntu systems.
Make one change at a time and test your program after each change. This helps you figure out which setting actually fixes the problem.
Creating a Desktop Shortcut for Easy Launching
After you get your program working, you can create a desktop shortcut so you do not have to open a terminal every time. Right-click on your desktop and select "Create Document" or "Create New", then choose "Empty File". Name it something like MyProgram.desktop.
Open the file with a text editor and paste this text:
[Desktop Entry] Type=Application Name=My Program Exec=wine /home/your_username/windows_programs/program_name.exe Icon=application-x-ms-dos-executable Categories=Utility;
Replace your_username with your actual Ubuntu username and program_name.exe with your actual program filename. Save the file, right-click it, select "Properties", go to the "Permissions" tab, and check "Allow executing file as program". Now you can double-click the shortcut to launch your program.
Troubleshooting Common Problems
If your program does not run or crashes immediately, start by checking the WineHQ AppDB to see whether other users have reported the same issue and what they did to fix it. The database includes notes about known problems and workarounds for thousands of programs.
The most common fixes are installing the correct version of Wine (some programs need a newer or older version than what Ubuntu provides), installing missing libraries with Winetricks, or adjusting the Windows version setting in winecfg. If your program needs a very specific version of Wine, you can install it from WineHQ's own repositories instead of Ubuntu's, though this is more complex.
If sound is not working, check the Audio tab in winecfg and make sure the driver matches what your system uses. If graphics look wrong, try enabling "Emulate a virtual desktop" in the Graphics tab. If the program is very slow, make sure you have installed the 64-bit version of Wine and that your program is actually 64-bit — you can check this by right-clicking the .exe file and looking at its properties.
Frequently Asked Questions
Will every Windows program work in Wine?
No. Wine works well with many programs, but some will not run at all or will run with bugs. Before you install, search the WineHQ AppDB for your specific program to see whether it is known to work and what issues other users have reported. If your program is not in the database, you can try installing it anyway, but there is no may provide it will work.
Is Wine the same as a virtual machine?
No. Wine translates Windows instructions to Linux instructions in real time, so programs run much faster than they would in a virtual machine. However, Wine is less reliable than a full virtual machine because it does not create a complete Windows environment — some programs that need deep Windows integration will not work.
Can I uninstall Wine without breaking my Ubuntu system?
Yes. Wine is just another program in Ubuntu. You can remove it with sudo apt remove wine wine32 wine64 and your system will work normally. Your Windows programs will not run anymore, but Ubuntu itself is not affected. The hidden .wine folder in your home directory will remain, but you can delete it manually if you want to free up space.
What if I need a different version of Wine than what Ubuntu provides?
You can install Wine directly from WineHQ's repositories instead of Ubuntu's. This is more complex and requires adding a new software source, but it gives you access to newer or older versions. Check the WineHQ website for instructions specific to your Ubuntu version before you try this.
Can I run multiple Windows programs at the same time in Wine?
Yes. Each program runs independently, though they all share the same Wine environment by default. If you want to run two programs with completely separate configurations, you can create separate Wine prefixes, but this is an advanced topic and not necessary for most users.