Install And Use Wine For Running Windows Programs On Ubuntu

There are a lot of people whose first computer would’ve been a windows based system. In fact, a majority of the population is not aware of Linux’s existence and the philosophy of Open Source Software. Let alone using Linux as their daily driver.

According to statcounter.com, Windows still dominates the desktop operating system market accounting for a whopping 74.73% market share. Needless to say, a lot of software companies are going to make software catering to the majority of the market instead of operating systems that have a single-digit market share.

Screenshot 2022 09 30 At 9.33.29 AM
Worldwide Desktop Operating System Market Share

As a Linux user, you are bound to be frustrated that some software is widely used in your industry or there is certain software that has no Linux alternative available. It’s a shame that we as Linux users don’t get to enjoy the best of the software out there, but all is not lost we do have an implementation of a windows emulator but like better than the standard definition of an emulator though as it is called W.I.N.E.

So is w.i.n.e an acronym for something? glad you asked or thought. W.I.N.E stands for Wine Is Not an Emulator. As you can guess the developers of wine are making it extra clear that it is not an emulator.

So if not an emulator, what is WINE?

Wine is a free and open-source implementation of the Windows API calls that get converted to the POSIX calls that Unix-like systems tend to run on. It recreates the entire windows backend architecture to run the .exe programs that exclusively run on the windows operating system.

Installing WINE on Linux

Installing wine is quite straightforward, there are two ways we can go about installing wine.

  1. Using Graphical User Interface (GUI)
  2. Using Terminal

1. Easy Way To Install Wine

  • Press the Show application button located in the bottom right of the screen
Show Applications
Show Applications
  • In the Applications Section locate the Software Store
Ubuntu Application Store
Ubuntu Application Store
  • Press the search icon for input
Searching For Wine
Searching For Wine
  • After typing in wine in the input area there will be a lot of options of wine to choose from, select the right wine as shown below.
Locating The Right Wine To Install 1
Locating The Right Wine To Install
  • Finally, its time to install wine
Installing Wine
Installing Wine
  • We have successfully installed W.I.N.E using GUI, Now let’s get started with the terminal installation.

2. Installing wine using terminal on Linux

  • There are various ways to access the terminal in Linux, the easiest way to open up the terminal is to use the combination of CTRL+ALT+T or SSH in the system.
  • If you are planning on using GUI to navigate to the terminal
  • Press the Activities tab
Screenshot 2022 09 30 At 11.11.21 AM
Press Activities tab
  • Search for Terminal
Screenshot 2022 09 30 At 11.15.09 AM
Terminal
  • That’s it we are now in terminal

A brief note on 32-bit and 64-bit software

Windows supports both 32-bit and 64-bit software. It is very seamless while operating 32-bit software on 64-bit supporting hardware. However, in Linux, we will have to first verify which operation mode your hardware supports, to install the appropriate wine for your system.

Now that I have enlightened you about operation mode, let’s get going!

  • We need to figure out which operation mode your hardware supports by entering the following command in your terminal
$lscpu
Screenshot 2022 09 30 At 11.22.55 AM
The CPU op-mode here is 64-bit
  • There are 3 types of op modes – 32-bit, 64-bit and 32, 64-bit that support both.

Installing W.I.N.E using terminal

  • Let’s start by updating all the application repositories
sudo apt update
Screenshot 2022 09 30 At 12.07.57 PM
Updating all application repositories
  • Since we have already verified that we are running in 64-bit operation mode , we will be installing wine made for 64-bit:
sudo apt install wine64
Screenshot 2022 09 30 At 12.08.56 PM
Installing wine for the 64-bit opcode system

Similarly, for 32-bit systems, we will be installing 32-bit wine:

sudo apt install wine32

What Windows applications are Supported by Wine?

The short answer is “not all” but the long answer is – it depends.

There are a lot of factors that will determine whether an application will work using wine, some include –

  • Windows Version supported by your version of wine, e.g. windows 10 application may not run in wine without any additional configuration as default install supports up to windows 7 apps and you can manually configure support for more versions (more on this later).
  • Dependencies required for running that particular software such as .net framework or Visual C++ Redistributable packages etc. One might need to download additional packages from their website and then run using the Winecfg tool inside WINEPREFIX directory of the said program which we shall see how to do soon enough! Also, there are some tools available out there which make installation and configuring dependencies easier like Winetricks which works quite well most of the time! We shall talk about it with examples further down below!

What is wine application database?

The Wine App Database is a massive repository maintained by people who have tested many Windows applications on Linux so they could rate them according to the functionality and purpose they serve under Linux via Wine.

This way users don’t have to test every single app before installing or re-installing it into another machine if necessary.

These ratings help users pick the right applications quickly based on their needs under Linux/Wine system without too much trial & error required with testing new apps.

The goal of Winedb is to allow people to use Windows applications on a Linux computer. In order to do this, the developers created a program called Wine. Wine allows Linux users to run Windows applications without actually having to install Windows; this is useful for people who want to use Windows applications but do not want to switch to a Windows computer. You can find the project here: https://appdb.winehq.org

Screenshot 2022 09 30 At 12.36.00 PM
Wine App Db

How to Find an Application in Wine Application Database?

This is quite simple to do actually, just go here: http://appdb.winehq.org and then type in name of the application you’re looking for in the search box located on the upper right-hand side of the screen near the top beside the ‘New Applications’ heading.

Hit enter key on your keyboard & all relevant results will appear below where it says “Search Results” if any exist matching what was typed in so be sure to select the correct one which should indicate a legitimate vendor/software company when available instead some random listings put up there by people who may or may not be qualified support said software item(s).

Search For App In Winhq Appdb
Search For App In Winhq Appdb

If no luck finding something that way then try expanding the drop-down menu next to the ‘Categories:’ heading located above the search box & try again from there but this time around pay attention to various categories listed within such as Games, Audio, Business etc since keeping those things mind might help narrow down scope bit more making it easier locate information user is seeking!

Getting Started with Wine

Now that we have installed wine let us understand how it works. In order for Windows programs to run using wine, they need a windows environment which gets created inside the home directory as a .wine folder these are called prefixes (more on this later) and each individual application running using WINE has its own prefix also known as virtual drive storage location used to store files related program being run under Linux via Wine system.

This makes sense because otherwise, your Windows applications would start messing with each other causing conflicts thereby preventing them from working correctly at best while crashing violently most times! So basically every single application you run through Wine creates a separate virtual drive storage location within a hidden “.wine” folder (located inside the home directory) where everything related to the said program is stored including configuration settings usually referred “WinePrefix”.

All this setup makes it possible to install multiple different versions same app without worrying about compatibility issues occurring although keep in mind things don’t always go smoothly resulting in certain glitches still occur now than even after following directions given specific items so remember to check App DB page mentioned earlier ensure piece software user wishes install supported fully before trying to avoid headaches caused errors often resulting numerous reboots computer until the desired effect achieved!!

That’s pretty much all there really know get started using the Wine system successfully under Linux OS provided the user can figure out the rest details along the way based on the needs and requirements set forth to make everything work perfectly together depending on the goals intended use case scenarios involved!

What is WinePrefix?

A wineprefix is a folder containing a complete separate windows installation. It contains all the necessary windows DLLs required for running an executable file (.exe), registry entries etc. A new instance of wineprefix gets created automatically when you install an application via wine unless already exists.

For example, installing Microsoft Word will create /home/$USER/.wine/drive_c/Program Files/Microsoft Office/, whereas installing Notepad++ will create /home/$USER/.wine//drive_c/Program Files (x86)/Notepad++/.

You can change the default prefix by setting $WINEPREFIX variable or passing the –prefix option to wineserver or winedbg commands; see man pages for more details.

You can explore existing instances by navigating through ~/.wine/drive_* folders from the terminal window. However, I highly recommend doing so only after backing up important data first though just in case something goes wrong somewhere along the process!

Please note that creating backup copies entire “.wine” folder located inside the home directory is strongly suggested as the first thing anyone should consider doing before attempting anything else involving tinkering around the operating system.

What is winecfg?

Winecfg is a configuration tool for Wine which you can use to set various options. In order to run it from a terminal window, just type in “winecfg” without quotation marks then hit enter key on your keyboard.

All relevant options will be displayed after that so feel free to check those out depending on what the user needs. The requirements are for a specific task(s) being performed but keep in mind not everything listed there makes sense to everyone.

Some things are more geared toward game players others might find particularly useful while working on software development projects example.

Example of Installing and running an Application with Wine

We will be installing MSI installer of steam. msi installers are just like executables of windows (.exe) however they are specifically created to just be installed as part of the operating system.

Image 5
Installing Steam in Linux using Wine

We can install the same via terminal usign the following command,

wine msiexec /i /path/to/installer.msi

The application installs as if its running in windows,

Image 6
Steam setup completed using wine

Here’s a snapshot of the application launcher on the desktop.

Image 7
Steam launch icon

Summary

Windows’ popularity has made many applications windows specific, making it hard for users of other platforms like Linux to make most of them.

W.I.N.E makes it possible for every user of Linux to enjoy apps that are made specifically for windows.