Home Beginner's Guide How to run Windows apps on your Ubuntu PC

How to run Windows apps on your Ubuntu PC

by Hend Adel
Wine

Allow us to say that there are not as many applications for Linux compared to Microsoft Windows. Linux has a vast world of free and open-source applications (FOSS) that should get almost all of your work done, but if you’re in a situation where you need to install and run a Windows program on your Linux system, don’t worry, we’ve got it covered too!

Wine for Linux allows you to run any other Windows application on your Linux desktop. Developers are still working to improve it, and it’s getting better every day. Having said that you may find some apps not working correctly.

Using a Windows app on Ubuntu

In this tutorial, we are going to walk you through the installation of Wine. Moreover, we will show you how to know whether the application can work with Wine or not. This guide can be divided into the following three parts:

  1. Wine Package Installation On Ubuntu.
  2. Search and Install Windows Application Using Wine.
  3. Uninstall Wine Completely From Ubuntu.

The following tutorial was performed on the Ubuntu machine, so before starting this guide, you need to make sure that your system is up to date using the following commands inside a Terminal. Or, if you prefer the GUI way, you can use the Ubuntu Software Center.

sudo apt update
sudo apt upgrade

Wine Package Installation On Ubuntu

Before starting, you need to check if your system is 32-bit or 64-bit. Then choose the suitable Wine version.

Step 1. Enter the following command to find out if your system is 32-bit or 64-bit.

uname -m

If you get output like the below then your system is 64-bit otherwise its 32-bit:

Check Ubuntu Architecture

Check Ubuntu Architecture

Step 2. (Skip this step if your system is 32-bit.) If your Ubuntu is 64-bit, then you need to run the following command to add the Wine i386 architecture before proceeding with the next steps.

sudo dpkg --add-architecture i386
Before Installing the Wine 64-bit Version Add the i386 Architecture

Before Installing the Wine 64-bit Version Add the i386 Architecture

Step 3. Use the following command to add the Wine signing key:

wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
Add the Wine Signing Key

Add the Wine Signing Key

Step 4. To add the latest available Wine repository.

sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ artful main'
Add the Latest Repository from the WineHQ

Add the Latest Repository from the WineHQ

Step 5. Wine has two available versions to download. The stable version and the development version. We recommend the stable version to make sure your installation is reliable.

Install the stable version:

sudo apt-get install --install-recommends winehq-stable
Install The Latest Stable Release of Wine

Install The Latest Stable Release of Wine

To install the development version:

sudo apt-get install --install-recommends winehq-devel

Step 6. To ensure that Wine has installed successfully, use the following command to fish out the Wine version.

wine --version
Wine Succesfully Installed

Wine Successfully Installed

Search and Install Windows Application Using Wine

As mentioned earlier, you won’t find all the Windows applications, but Wine developers are making tremendous progress. First, you need to search for the Windows application you need to use. Then download, install, and open it using Wine.

Step 1. Using your favorite internet browser, open the Wine official website to search for Windows applications that are available to be used with Wine.

Launch Wine website

Step 2. From the left panel on the Wine website, select “Browse Apps.”

Select Browse Apps

Select Browse Apps

Step 3. Next, search for the application you want to download.

Start Searching For a Certain Application

Start Searching For a Certain Application

Step 4. In this example, we will search for the Notepad++ application to download. Then click on the application name to get more information.

Search For Application And Get Results

Search For Application And Get Results

Step 5. You should get all the available versions from the Notepad++ application. Choose any one and click to open it.

Select The Version You need to Download

Select The Version You need to Download

Step 6. To download the required version, click on the given URL.

Download Link

Download Link

Step 7. Choose the “.exe” file to download.

Select The Installer exe File

Select The Installer exe File

Step 8. Save your file and click OK to download.

Save Your File

Save Your File

Step 9. The download finishes successfully.

Application Downloaded Successfully

Application Downloaded Successfully

Step 10. Move to the download directory.

Move To The Download Directory

Move To The Download Directory

Step 11. Right-click on the downloaded application and select to “Open With Wine Windows Program Loader” option.

Select Open With Wine

Select Open With Wine

Step 12. Wine should start to perform configuring and should create some directories.

Wine Configuration Message

Wine Configuration Message

Step 13. Typically, Wine may need to install some more packages to run the downloaded application. Click to install .Net.

Select The Install Button

Select The Install Button

.Net download and installation in progress.

Select The Install Button To Install Gecko Package

Download Inprogress

Wine requires to install Gecko, click the “Install” button.

Select The Install Button To Install Gecko Package

Select The Install Button To Install Gecko Package

Gecko download and installation in progress.

Download Required Gecko Package

Download Required Gecko Package

Step 14. Now Notepad++ application installer will open, select your preferred language and click OK.

Press Ok Button To Install Notepad++

Click OK Button To Install Notepad++

Step 15. Click Next to continue the installation.

Press Next To Continue

Click Next To Continue

Step 16. Read the license agreement and click, I Agree.

Agree On License Terms and Conditions

Agree On License Terms and Conditions

Step 17. Installation location, as you can see, the installation will be the same as Windows.

Select Installation Location

Select Installation Location

Step 18. Custom your installation if you need it.

Custom Your Installation

Custom Your Installation

Step 19. Now Notepad++ will extract its required files.

Installation Is Inprogress

Installation Is Inprogress

Step 20. Notepad++ has installed successfully on Ubuntu using Wine.

Installation Completed Successfully

Installation Completed Successfully

Step 21. That’s it! You should be able to launch the Notepad++ application.

Welcome To Notepad++ On Ubuntu Using Wine

Welcome To Notepad++ On Ubuntu Using Wine

Uninstall Wine Completely From Ubuntu

Just in case if you do not want to use the Wine application anymore, you can altogether remove it from Ubuntu, please follow the below steps carefully.

Step 1. Purge Wine Stable version.

sudo apt-get purge winehq-stable
Uninstall Wine From Ubuntu

Uninstall Wine From Ubuntu

Step 2. Remove all the Wine related directories from your machine. Be careful while using the rm command because any single error in the command you may end up messing your system.

rm ~/.config/wine/ -rf
rm -rf $HOME/.wine
rm -f $HOME/.config/menus/applications-merged/wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/wine*
rm -f $HOME/.local/share/icons/????_*.xpm
Completly Remove Wine Directories

Completely Remove Wine Directories

Now you should have uninstalled Wine entirely from your machine.

Conclusion

That’s all about how to install the Wine application, install Windows app, and use it on your Ubuntu PC.

You may also like

6 comments

Bob August 15, 2020 - 6:14 AM

Works perfectly. Many thanks

Reply
Scott September 18, 2020 - 6:16 AM

As with most things Ubuntu, it quicly becomes obsolete and doesn’t work anymore:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
winehq-stable : Depends: wine-stable (= 5.0.2~bionic)…

E: Unable to correct problems, you have held broken packages.

Reply
Paul November 24, 2020 - 9:44 AM

ummm. I get to step 4 and then it fails.
This is 2020 not 1965 why do we a have to type so much text to install things.

Reply
ZED June 1, 2021 - 2:00 PM

AHHHH NOOO HELP PLZZZZ
zed@zed-HP-EliteBook-8470p:~$ sudo apt-add-repository ‘deb http://dl.winehq.org/wine-builds/ubuntu/ artful main’
Hit:1 http://za.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ppa.launchpad.net/cybermax-dexter/sdl2-backport/ubuntu bionic InRelease
Hit:3 http://dl.winehq.org/wine-builds/ubuntu artful InRelease
Hit:4 http://za.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://za.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:7 https://dl.winehq.org/wine-builds/ubuntu groovy InRelease
Hit:8 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:9 https://dl.winehq.org/wine-builds/ubuntu hirsute InRelease
Hit:10 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Hit:11 https://dl.winehq.org/wine-builds/ubuntu eoan InRelease
Reading package lists… Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/za.archive.ubuntu.com_ubuntu_dists_bionic_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

Reply
Viamesoh86 November 15, 2021 - 4:58 PM

excellent! is very important gecko!

Reply
Chris August 12, 2022 - 9:47 PM

After several years experimenting with Wine (and only getting it to work in a few instances), and reading some of the comments here, I can only conclude that using Wine is is too hard for the average user so using Windows apps on Ubuntu with Wine is currently a no go 🙁

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.