How to install and configure Wine on Ubuntu 21.10

Wine is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems i.e Linux, macOS, and BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls instantly eliminating the performance and memory penalties of other methods and allowing you to integrate Windows applications in your desktop.

In this tutorial, I will take you through the installation steps of Wine in Ubuntu 21.10/21.04.

What is new in Wine 7.0-rc1 release

  • Reimplimentation of winMM joystick driver
  • All unix libraries converted to the syscall-based libraries

Benefits of Using Wine

  • Unix has made it possible to write powerful scripts, Wine makes it possible to call windows applications from scripts that can also laverage Unix environment.
  • Wine makes it possible to access Windows applications remotely.
  • Wine makes it possible to use thin clients i.e install Wine and you will easily connect to windows applications using x-terminal.
  • Wine is open-source so you can easily extend to suite your needs.
  • Wine can be used to make existing windows applications available on the web by using VNC and its Java/HTML5 client.

Install Wine 7.0 on Ubuntu 21.10/21.04

Wine comes preinstalled with Ubuntu systems, but there is one thing to consider, for 64-bit architecture you need to enable 32 bit for Wine to run effectively.

First, let’s run system updates with the following command.

$ sudo apt update $$ apt upgrade -y

When both updates and upgrades are complete, now you can enable 32-bit architecture. Run the following command on your terminal.

$ sudo dpkg --add-architecture i386

We need to add the repository key by downloading from the following:

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
Output
--2021-12-12 07:25:43--  https://dl.winehq.org/wine-builds/winehq.key
Resolving dl.winehq.org (dl.winehq.org)... 151.101.18.217
Connecting to dl.winehq.org (dl.winehq.org)|151.101.18.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3220 (3.1K) [application/pgp-keys]
Saving to: ‘winehq.key’

winehq.key                   100%[===========================================>]   3.14K  --.-KB/s    in 0s      

2021-12-12 07:25:43 (34.9 MB/s) - ‘winehq.key’ saved [3220/3220]

Add key with the following command

$ sudo apt-key add winehq.key

We have downloaded and added the key, next is to add the following WineHQ repository into our system.

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'
output
Repository: 'deb https://dl.winehq.org/wine-builds/ubuntu/$(lsb_release -cs) main'
Description:
Archive for codename: -cs) components: main
More info: https://dl.winehq.org/wine-builds/ubuntu/$(lsb_release
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.

Press enter to allow installation to complete.

If it happens you get an error “The repository ‘https://dl.winehq.org/wine-builds/ubuntu/$(lsb_release -cs) Release’ does not have a Release file.” make sure all the dependencies are installed. To install most of the dependencies run the following command.

$ sudo apt install software-properties-common

Then now you need to run system update again for the changes to take effect

$ sudo apt update

Install wine stable release

To install wine run the following command

$ sudo apt install --install-recommends winehq-devel

Press Y to allow installation to continue.

Sample output
Selecting previously unselected package wine-devel.
Preparing to unpack .../wine-devel_7.0~rc1~impish-1_amd64.deb ...
Unpacking wine-devel (7.0~rc1~impish-1) ...
Selecting previously unselected package winehq-devel.
Preparing to unpack .../winehq-devel_7.0~rc1~impish-1_amd64.deb ...
Unpacking winehq-devel (7.0~rc1~impish-1) ...
Setting up wine-devel-i386:i386 (7.0~rc1~impish-1) ...
Setting up wine-devel-amd64 (7.0~rc1~impish-1) ...
Setting up wine-devel (7.0~rc1~impish-1) ...
Setting up winehq-devel (7.0~rc1~impish-1) ...

Check the version of the installed wine

$ wine --version
wine-7.0-rc1

After installation, we need to configure wine. Run winecfg on your terminal. It will install gecko and Mono into your system.

$ winecfg

Conclusion

I hope this tutorial has taught you how to install and configure wine on Ubuntu 21.10. Welcome back again for more tutorials of this kind.

About Mason Kipward

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Mason Kipward →

Leave a Reply

Your email address will not be published.