Hello, friends. In this post, you will learn how to install Wine 6 on Ubuntu 20.04.
Wine is one of those applications that practically any Linux user knows. Thanks to Wine we can run several Windows applications on Linux. It works as an interpreter that creates an execution layer for programs that can be run in Linux.
Wine is included in the official repositories of almost any distribution. The problem is that Wine’s development is too active (which is very welcome) and they constantly add features and improve the support of the applications and Ubuntu does not update the base packages.
Therefore, if you notice when using Wine that certain programs do not run correctly, then updating Wine may be a solution.
So let’s go for it.
Install Wine 6 on Ubuntu 20.04
Unfortunately, Ubuntu does not provide the latest version of Wine so we have to rely on an external repository. It’s not that complex either thanks to the repository provided by the developers.
So, open your terminal and update the distribution
sudo apt update
sudo apt upgrade
Then you have to enable support for the 32-bit architecture by Ubuntu and DPKG.
sudo dpkg --add-architecture i386
Then download the GPG key from the Wine repository
wget -nc https://dl.winehq.org/wine-builds/winehq.key --2020-12-28 20:24:34-- https://dl.winehq.org/wine-builds/winehq.key Resolving dl.winehq.org (dl.winehq.org)… 151.101.246.217 Connecting to dl.winehq.org (dl.winehq.org)|151.101.246.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 2020-12-28 20:24:34 (17.9 MB/s) - ‘winehq.key’ saved [3220/3220]
Add it to the system:
sudo apt-key add winehq.key
Then add the Wine repository.
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
Refresh the system repositories
sudo apt update
And finally, you can install the latest version of Wine by running it:
sudo apt install --install-recommends winehq-stable
The download will start as soon as you enter your password and confirm the installation.
Finally check the version of Wine installed.
wine --version
So, enjoy it.
Using Wine on Linux
Wine’s database is vast, but as you can imagine, not all applications work in the same way.
Therefore, you should first access this link and start getting information about the application you want to run in Wine.
Once you are sure which application you want to install and if you can run it properly, you need to set up a prefix.
To do this, in the terminal, run:
winecfg
which will bring up a Wine configuration window and create the emulator configuration folder.
There you will have to configure Wine to your taste and needs.
Then, when you are ready, just open an EXE executable with Wine using the right mouse button and choose the application.
Another quicker and more direct way is to use the terminal:
wine [exe_file]
and if all goes well, then the application will run.
Uninstall Wine
In case you want to uninstall wine, the only thing you have to do is to run the following command
sudo apt remove winehq-stable
And you’re done.
Conclusion
Wine is an application that is a veteran within Linux. However, it is quite popular especially with users coming from Windows. It does not always give the expected results but it can work and solve several problems.
You need to put a ‘ at the end of this line or it doesn’t work:
sudo add-apt-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
Dan
you are right. Thanks!
Question:
Once you install the application how do you start the application with the command line? I can only seem to start the application if I re-install it each time I want to use it. I am running a windows program called songbook from https://www.linkesoft.com/songbook/
Dan
Hello, my friend. The process depends on each application. Usually, you have to access the folder where it was installed and look for the executable of the application. You can open it with Wine using the file browser (right-click > Open with) or using the wine command to the file.
For convenience, you can create a symbolic link to other sites such as the desktop.