Run Windows Apps on Ubuntu or Debian using Winetricks

Wine serves as a connector facilitating the operation of Windows applications, on Linux and macOS systems without the need to mirror the Windows environment. By translating Windows instructions into a format that Unix/Linux or macOS can comprehend it permits the utilization of Windows software of a Windows configuration.

Winetricks, on the hand is a script created to make it easier to set up the required libraries, components and dependencies for smoothly running Windows applications, on Wine. Using Winetricks can simplify the installation of DLLs (Dynamic Link Libraries) fonts and other key elements that certain Windows programs need to work.

Thanks to Wine and Winetricks, we can successfully run Windows programs on Linux. These tools work pretty well together but don’t actually depend on each other for proper functionality. Winetricks can be used entirely on it’s own but is often used on top of Wine for easier set up of different components that are required to run these Windows programs on Linux. The difference between Wine and WInetricks is that Wine is a compatibility layer and Winetricks is basically a script used to install various libraries and components within Wine. 

Install Wine and Winetricks on Ubuntu / Debian

In this guide, we are going to learn how to install Wine, then use it to run any windows application we’d like. Follow these steps to run Windows apps on Ubuntu or Debian using Wine and Winetricks:

Step 1. Adding the Wine Repository

Adding the official Wine repository ensures you get the latest and most stable version of Wine. Open a terminal and run the following commands:

# Add the Wine repository key
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor -o /usr/share/keyrings/winehq-archive-keyring.gpg

# Add the Wine repository (for Ubuntu)
echo "deb [signed-by=/usr/share/keyrings/winehq-archive-keyring.gpg] https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/winehq.list > /dev/null

# Add the Wine repository (for Debian)
echo "deb [signed-by=/usr/share/keyrings/winehq-archive-keyring.gpg] https://dl.winehq.org/wine-builds/debian/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/winehq.list > /dev/null

# Update the package list
sudo apt update

Step 2. Installing Wine & Winetricks

Now, install Wine and Winetricks using the following commands:

sudo apt install --install-recommends winehq-stable winetricks -y

You can choose between winehq-stable, winehq-devel, or winehq-staging depending on your preference for stable, development, or staging versions.

Step 3. Configure Wine

Run the Winetricks app, which will automatically create the necessary directories for you with the command below. 

winetricks

If you run into an error such as “Wine could not find a wine-mono package which is needed for .NET applications to work correctly” shown below, just do as the prompt instructs and click “Install” to resolve the problem.

Wine will download and execute the Wine mono installer to resolve the missing package. Wine will then update and relaunch.

In the resulting window, click Select the default wine-prefix and then OK.

In the following window, choose Run winecfg and then click OK.

You may next choose the version of Windows you want Wine to emulate by picking an option from the Windows Version selection and click Apply then OK.

Winetricks allows you to also take care of a number of other options, such as installing DLLs, fonts, and more. But at this point, you can close out that window and prepare to install your first Windows app.

Now, we need to create a 32-bit (win32) prefix because many Windows applications, especially older ones, were designed to run on 32-bit Windows systems. Open winetricks program and select “Create new wineprefix” then select 32-bit and name it win32.

Now when you open winetricks, you can select win32.

Step 4. Download and Install Windows Application

When installing a windows application, we can either use Wine or Winetricks. Lets take a look at both:

Using Wine

Let’s install a very popular programmers notepad—Notepad++. First, download the Windows installer for the app and save it in your Downloads directory then, open your terminal window and change into the Downloads directory with the command cd ~/Downloads. 

Run the installer with the command wine your_application_installer.exe or  right-click that file and select Open in Wine Windows Program Loader.

 Finally, the Windows install wizard will open, where you can click your way to success.

Agree to the license terms by clicking on the “I Agree” button.

Follow the installer to finish your installation.

You Window application is ready.

Using Winetricks

Winetricks is an amazing feature of Wine which allows yo to install a Windows software straight via Winetricks. If you start the Winetricks program, which is now accessible from your desktop menu, and pick Install an application, you will be presented with a selection of apps that can be installed straight from the GUI. Using this technique, the installer file will be downloaded and executed automatically. The installation wizard will then be accessed to finalize the process.

For instance, lets install the same Notepad++ using winetricks. Open winetricks then select Install application and click on npp which is the package name for Notepad++ then click OK. Select the installer language and proceed with the installation.

Follow the installer to complete your installation.

Uninstalling Windows Application

To uninstall a windows application using winetricks, open the winetricks program and pick select default wienprefix and then Run Uninstaller. This will open the Add/Remove Program showing all the installed programs.

Choose the program you’d like to uninstall and click on Modify/remove to open the uninstall program.

Now click the Uninstall button.

You have successfully uninstalled the application.

Conclusion

The program you choose to install will determine how much work has to be done. If you have problems while attempting to install a Windows application with Wine, you may need to investigate the required parameters for that specific application. It’s far simpler than you may expect to install compatible Windows software on Linux using Wine, despite those possible problems. Take pleasure in using Windows programs on Linux.

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

Let’s clarify the differences between merge requests (commonly called pull requests in GitHub), releases, release candidates (RCs), tags, and branches […]

Kind (which in full means “Kubernetes IN Docker”), is a command line tool that enables you to run Kubernetes clusters […]

Are you looking for an easy way to migrate packages from one cPanel server to a new cPanel server? In […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.