Install Wine and Run Windows Applications on Linux

Shan Shaji
4 min readJul 25, 2020

Wine stands for Wine Is Not an Emulator. It is a compatibility layer that will allow us to run computer programs developed for Microsoft Windows in Unix like operating systems. Wine converts the internal windows command to Linux commands.

Here I am using Ubuntu as the Linux distro.

Installing Wine Using Terminal

Open Your Terminal by pressing ctr + alt + t and type the below-given commands.

sudo dpkg --add-architecture i386

If your system is 64 bit, enable 32-bit architecture. The above command will add 32bit architecture support on your distro which will benefit you in installing specific software.

Download and add the repository key by copy-pasting the below command to the Terminal. This command will show OK on the terminal.

wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -wine --version

Adding The Repository

Please Select the command based on your ubuntu version.

Ubuntu 20.04

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

Ubuntu 18.04

sudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’

Ubuntu 16.04

sudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main’

After the execution of the above command update the packages list using the below command.

sudo apt update

Install one of the following packages

Stable Branch

The stable branch is intended to be a safe source of fixes for high impact bugs and security issues that have been on master since a given release. Try to select this branch as it is more stable than other branches.

sudo apt install --install-recommends winehq-stable

Development Branch

This branch may have bugs and can crash the app.

sudo apt install --install-recommends winehq-devel

Check the installation by typing the below command in the terminal.

wine --version

that’s it 😄, Successfully installed wine.

Running Wine

There are a large number of Windows applications that are fully supported by Wine. However, everyday new Windows Applications are developed, many of them may not function as we want. There is a dedicated database just for that. Wine Application Database has applications rated with status depending on how well the application can run in wine.

Windows applications need a C: drive. Wine uses a virtual C: drive for this purpose. It is called Wineprefix. It is like a small windows system that runs through Wine. A clean wineprefix does not have any programs installed in it or settings changed. It is stored in .wine folder (This is a hidden file) in your home directory.

Open the Terminal and enter the given command.

winecfg

This will create a wineprefix and will open the configuration window for Wine.

You can change the configuration as you want but for now, accept the default settings. Now you can locate virtual C: drive by typing the below command in the Terminal.

cd ~/.wine/drive_c/

Install an Application in Wine

Installing a wine supported application is easy but I will describe the step by step procedure to install an application 🙂. Here we are going to install VLC Media Player on Wine. Check for VLC Player rating on Wine Application Database. It has a silver rating, which means it has some minor issues but in this tutorial, we are good to go.

Navigate to the folder where you have downloaded the installation file of the VLC Media Player. Right-click on the installation file and select Open with wine windows program loader.

Complete the installation just like windows.

Setup Window for VLC media player

Make sure the path is correct. It should be within the c: drive. After finishing the installation and go to the installation directory (The path which you gave during the installation) using the file manager in my case it is C:\Program Files(x86)\VideosLAN\VLC.

Right-click on vlc.exe and click on properties and select the option Open With from that Select Open With Wine Windows Program Loader as the default program to launch the application.

There you go! 🤩 We have successfully installed wine and a windows Application. Hope it was easy🙂.

--

--

Shan Shaji

Skilled in Flutter, React, MongoDB, Express, and Typescript. Experienced with Flutter architectures, state management, Firebase, and cloud functions.