Users can easily run Windows applications on their Linux PC by installing Wine on Ubuntu. Wine, which stands for “Wine Is Not an Emulator,” offers a compatibility layer. It lets Ubuntu users use a variety of Windows apps without requiring a dual-boot or virtual machine configuration. Our dedicated hosting experts will fix any issues from anywhere in USA with minimized downtime and smooth business operations.

The DedicatedCore storage VPS hosting offers up to 10TB of data capacity for all your backup and storing needs. Coming back, Hope you get the step-by-step process of installing Wine on your Ubuntu system. Opening up a world of possibilities for program compatibility. Whether you’re a Linux fan or someone switching from Windows to Ubuntu.

Required Conditions

  • An account that has sudo access
  • Installing Ubuntu 18.04 LTS Desktop or Ubuntu 20.04
  • Having access to a command line or terminal window (Ctrl-Alt-T)

Use the Ubuntu Repository to Install Wine.

Step 1: Check if your Ubuntu System is 32- or 64-bit.

Learn how to effectively create and configure a swap file on Ubuntu 16.04 and 18.04 to optimize virtual memory performance and system stability. For Ubuntu 64-bit and 32-bit versions, Wine utilizes a distinct program.

Enter the lscpu command to examine CPU details:

lscpu

The type of architecture you are using is indicated by the CPU op-mode(s) field:

  • CPU operating mode(s): 32-bit The OS you have is 32-bit.
  • Operating system: 64-bit Your OS is 64-bit.
  • CPU operating mode(s): 32- and 64-bit You back them both.

verify versions of ubuntu

Step 2: Install Wine using the Default Repositories in Step Two.

The simplest way to install Wine is to use the default Ubuntu repository. But be advised that it might not offer the most recent version.

1. Update the package list of the apt repository first. By doing this, Wine’s most recent stable version gets installed.

sudo apt update

2. Enter the following to install 64-bit Wine:

sudo apt install wine64

To install Wine 32-bit, type the following commands:

sudo apt install wine32

Step 3: Confirm the Installed Version of Wine

Once the process is finished, confirm the installation by looking at the version that is currently in use:

wine --version

command to verify wine version

A stable installation of Wine can always be obtained by installing it from the official Ubuntu repository. The most recent versions might not be present in the repositories, though.

Install Wine from the WineHQ Repository as an Alternative.

Install Wine from the developers’ repositories on Ubuntu if you require a more recent version.

1. Enable 32-bit architecture first if you are using a 64-bit operating system:

sudo dpkg --add-architecture i386

2. Next, perform another repository update:

sudo apt update

installing recent version of wine

3. Include the GPG key:

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

wget command to add gpg key

4. Next, add the WineHQ repository to Ubuntu by running the following commands:

sudo apt install software-properties-common
sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main"

command add wineHQ repository to ubuntu

5. Revise the lists of packages:

sudo apt update

6. Use this command to install the most recent stable version of Wine:

sudo apt install --install-recommends winehq-stable

As an alternative, run the following command to install Wine’s most recent development release:

sudo apt install --install-recommends winehq-devel

7. Use: to confirm the installation

wine --version

shows if wine is installed

How to Upgrade Wine

Wine is often updated. To update wine manually, run the following command:

sudo apt-get upgrade winehq-stable

To switch to the development version, use devel instead of stable. There are stable releases every ten to twelve weeks. Updates for developers are released considerably more regularly.

Wine makes an installation directory in the home directory by default. It reads commands using a virtual C:\ drive. This directory is located at /$HOME/.wine/drive_c/.

Ways to Remove Wine From Ubuntu

To remove Wine:

sudo apt remove wine[version]

Depending on the installed version, substitute wine64, wine32, wine-stable, or wine-dev for wine[version].

Wine is removed with that command, but its dependencies remain. Type the following command to eliminate any superfluous dependencies:

sudo apt autoremove

It is necessary to remove these leftover folders manually. Execute the subsequent commands:

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

Following the files and folders deletion, execute:

sudo apt-get remove --purge ^wine

Run the following command now to fix any installation errors:

sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

By executing the command you should completely clear wine.

How to Use Wine

To configure Wine’s configuration directory, execute the subsequent command:

wineboot

The command initializes all the components and creates the ~/.wine directory.

Beginning Application

To launch a Windows.exe file on Ubuntu using a graphical user interface, double-click on it. Wine identifies with the.exe file extension by default. Another option is to right-click the program and choose Open With > Wine.

Enter the following to start an application from the command line:

cd '/.wine/drive_c/program_folder'
wine launcher.exe

Changing the working directory to the application file location is crucial. Program_folder should be replaced with the actual directory containing the application. Substitute the application’s executable file for launcher.exe.

Command “Wine Start”

Compared to the basic wine command, the wine start command is more reliable. Wine can now manage the working directory thanks to it. Utilize it to provide a path to a particular place:

wine start 'C:\program_location\launcher.exe'

Give a Linux path to use:

wine start /unix "$HOME/program_location/installer.exe

To run the Windows application installation, use the wine or wine start command.

Use wget to download an installation to a local directory, and then run the installer with the wine command. The software installs exactly like it would on Windows. Use the wine start command to specify the installer’s path when installing from a disc. If necessary, use this to switch disks mid-installation. Avoid using Wine as the root user for security reasons. By doing this, you may be letting malware and viruses attack your computer.

Final Thoughts on Installing Wine on Ubuntu

To sum up, installing Wine on Ubuntu gives users access to a wide range of Windows apps. It allows them to take advantage of the greatest features of both platforms. Especially without risking the security and reliability of their Linux environment. Streamline your server management by following this explicit principle on installing Webmin on Ubuntu, offering an instinctive web-based interface for efficient system administration.

You may incorporate Windows software into your Ubuntu system. This improves your computing experience by following the easy procedures described in this guide. Wine provides a flexible way to run your preferred Windows apps on Ubuntu, regardless of your level of Linux experience. So why hold off? Now is the time to get in and use Wine to unleash the full potential of your Ubuntu system.