How to Install and Use Wine on Ubuntu for Running Windows Apps

Pratik MPratik M
6 min read

One of the biggest challenges faced by new Linux users migrating from Windows is the lack of software compatibility. Applications built for Windows do not natively work on Linux systems like Ubuntu.

This is where Wine comes into the picture.

Wine (short for Wine Is Not an Emulator) is an open source compatibility layer that allows running Windows executables on Linux and macOS. With Wine, you can install and run Windows applications like MS Office, Photoshop, games, and more on your Ubuntu desktop seamlessly.

In this detailed guide, we will walk through the entire process of installing, configuring and using Wine on Ubuntu to run your favorite Windows software.

Understanding How Wine Works

Before we get into the installation, it is important to understand what Wine actually does under the hood.

Wine is NOT an emulator. There is a common misconception that Wine emulates a Windows environment on Linux to run apps built for Windows.

Instead, Wine reimplements Windows API calls at the core system level on Linux. When a Windows application makes API calls to access system resources, Wine intercepts those calls and translates them into native Linux system calls.

This allows the Windows executable to run smoothly on Linux just like a native application. The key advantages of this approach are:

  • No overhead or performance losses unlike virtualization or emulation.

  • Seamless integration with the Linux desktop environment. Windows apps look and behave like native apps.

  • Scalable implementation - Wine developers only reimplement parts of the Windows API needed by apps, not the entire operating system.

Understanding this architecture helps explain why Wine is so effective at running Windows software on Linux systems like Ubuntu.

Installing Wine on Ubuntu

There are a couple of recommended ways to install Wine on Ubuntu:

Method 1: Using APT Package Manager

The easiest way is using Advanced Packaging Tool (APT), Ubuntu's default package manager:

First, add the WineHQ repository key:

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key

Next, add the WineHQ repository:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

Finally install the wine-stable package:

sudo apt install --install-recommends winehq-stable

This installs the most recent stable version of Wine on your Ubuntu system.

Method 2: Download .deb Package

You can also manually download the latest .deb package for Ubuntu from the WineHQ website.

Navigate to the stable releases and copy the download link for Ubuntu.

Then run:

wget [copied_link]
sudo dpkg -i [downloaded_file.deb]

This installs the DEB package manually.

Both methods deliver the same end result - the latest stable release of Wine on your Ubuntu desktop!

How to Use Wine to Run Windows Apps

Once Wine is installed, running Windows executables is straightforward:

1. Install the Windows Application

First, install the Windows application you want to use just like you would on Windows.

Most apps provide an installer EXE file to download and run.

2. Run the EXE with Wine

To launch the app, right-click on the EXE file, select "Open With", and choose Wine Windows Program Loader.

Alternatively, run:

wine /path/to/app.exe

This executes the EXE using Wine.

3. Integrate App Shortcuts

For easier access, you can add app shortcuts to the desktop and app launcher:

  • Desktop file: Create a .desktop file for the app in ~/.local/share/applications

  • Launcher: Right-click on the Ubuntu app launcher, select Edit menu > Add item and fill in the app details.

The app will now show up just like any other native Linux application for quick access!

Essential Wine Tools and Packages

To enhance the Wine experience on Ubuntu, some additional tools and packages are recommended:

  • Winetricks - Installs Windows DLLs, fonts, and other resources needed by apps.

  • PlayOnLinux - Frontend manager for installing and configuring Wine.

  • Wine gecko - MS HTML rendering engine needed for apps like Steam.

  • Wine Mono - For .NET framework support.

  • FAudio - Audio library for games and audio applications.

  • Vulkan drivers - For GPU acceleration in games.

These packages address many common application dependencies and help run apps smoothly under Wine.

Now let's look at how to install some popular Windows apps on Ubuntu using Wine:

Microsoft Office

LibreOffice comes pre-installed with Ubuntu, but if you need Microsoft Office, Wine makes it possible.

To install MS Office on Ubuntu:

  1. Install wine, winetricks and vulkan packages.

  2. Download Office installer EXE from Microsoft.

  3. Use winetricks to install required fonts and DLLs:

winetricks riched20
  1. Execute the Office installer EXE using Wine and complete setup.

  2. Launch Word, Excel etc. like any other Linux app.

With some minor tweaking, you can get the full Microsoft Office suite running smoothly.

Adobe Photoshop

Like MS Office tools, Adobe's creative suites are must-haves for many. Here is how to get Photoshop working with Wine:

  1. Enable CS4 rendering support:
winecfg

In Libraries tab, add photoshop to New override for library and select win7 as the version.

  1. Install Photoshop using the EXE installer with Wine.

  2. Install additional fonts using winetricks for maximum compatibility.

  3. Launch Photoshop via Wine and enjoy the full native experience!

Steam Games

Gaming is one of the biggest use cases for Wine among Linux users. The steps to install Steam and games are:

  1. Enable 32-bit architecture:
sudo dpkg --add-architecture i386
  1. Install Steam using the EXE installer and Wine.

  2. Install GPU drivers if using Nvidia or AMD cards for gaming.

  3. Enable CSMT mode in Wine for optimized performance.

  4. Install steam-devices package for controller support.

  5. Launch Steam via Wine, install games and play!

With Wine combined with Steam Proton, your Windows gaming library is now accessible on Linux.

Beyond the above examples, Wine has great support for tons of other Windows apps:

  • Browsers like Google Chrome, Firefox, Opera

  • Media apps like Spotify, Foobar2000

  • Messaging like WhatsApp, Telegram, Discord

  • Creative tools like Blender, Unity, Android Studio

  • Utilities like WinRAR, 7zip

Check out the Wine App Database for detailed compatibility ratings of thousands of apps.

Troubleshooting Wine Issues

Of course, Wine is not perfect. You may face issues running more complex Windows apps. Here are some troubleshooting tips:

  • Check the AppDB to see if others faced similar issues and solutions.

  • Use different Wine versions (stable, development, staging) if one has bugs.

  • Double check Wine system settings to ensure your app's required Windows version is selected.

  • Install missing fonts, DLLs or other dependencies with Winetricks.

  • Toggle Wine debug logging and terminal output to see where problems occur.

  • Look for Linux native alternatives if an app has too many problems under Wine.

While Wine does not have 100% app compatibility, the community and documentation around it make troubleshooting much easier.

Conclusion

With this detailed guide, you should now have a good understanding of how to install, configure, and use Wine for running your favorite Windows applications on Ubuntu Linux.

The key takeaways are:

  • Wine provides Windows compatibility without emulation by translating Windows API calls to Linux.

  • Install Wine on Ubuntu using APT packages or .deb files from WineHQ.

  • Run EXE installers with Wine and integrate apps into your Linux desktop.

  • Essential tools like Winetricks, PlayOnLinux and Vulkan drivers enhance compatibility.

  • Popular apps like MS Office, Photoshop, Steam games work well under Wine.

  • Check AppDB and troubleshoot issues using different Wine versions and packages.

Transitioning from Windows to Linux is now smoother than ever with the help of Wine. You can truly get the best of both platforms - freedom of Linux and your preferred Windows tools and games.

Let me know in the comments if you have any questions on getting set up with Wine or if you have cool app recommendations that work well with it!

0
Subscribe to my newsletter

Read articles from Pratik M directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pratik M
Pratik M

As an experienced Linux user and no-code app developer, I enjoy using the latest tools to create efficient and innovative small apps. Although coding is my hobby, I still love using AI tools and no-code platforms.