install wine in ubuntu

How to Install & Use Wine in Linux

Wine is a popular utility tool that allows you to easily use Windows applications in Linux environment. In other words, it allows you to run .exe files in Linux. You can also use it to call Windows applications from scripts, or access them remotely. In this article, we will look at how to install & use Wine in Linux.


How to Install & Use Wine in Linux

Here are the steps to install & use Wine in Ubuntu Linux.


1. Enable 32-bit architecture

Open terminal and run the following command to enable 32-bit architecture using dpkg command.

$ sudo dpkg --add-architecture i386


2. Add Wine Repository Key

Next we add Wine repository key with the following command.

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

Once the repository key is added, you should get OK as output.


3. Enable Wine Repository

Next, we need to enable Wine repository with the following command.

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


4. Update System

Run the following command to update system packages.

$ sudo apt update


5. Install Wine 6.0 in Ubuntu

Now we need to install Wine 6.0 using apt package manager.

$ sudo apt install --install-recommends winehq-stable

Once the installation is complete, you can verify its version with the following command.

$ sudo wine --version


6. Use Wine

You can easily use wine by downloading setup/binary files that you want to run and specifying it after wine command. Here is an example to run node.exe file in wine.

$ sudo wine node.exe

Wine command will begin by creating Wine config file in home directory, ~/.wine. It will automatically download and install any dependencies for these windows applications, and display all prompts during this process.

In this article, we have learnt how to install and use Wine utility in Ubuntu Linux.

Also read:

How to Iterate Over Multiple Python Lists in Parallel
How to List All Files in Directory in Python
How to Send HTML Email with Attachment in Python
Postfix Email Configuration Step by Step
How to Install Go Access Log Analyzer in Ubuntu

Leave a Reply

Your email address will not be published.