Как установить wine на ubuntu
Перейти к содержимому

Как установить wine на ubuntu

  • автор:

How to install and configure Wine?

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.

What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?

If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?

Luis Alvarado's user avatar

3 Answers 3

If you want to use the latest development/staging version of Wine, please make sure to follow the guide in the Official WineHQ Guide for Ubuntu, basically covering:

If you are using a 64-bit Architecture, then enable 32-bit for better compatibility

Add the Wine Key, Wine Repository & Update Repositories

We would add the repository like this ( lsb_release -sc will automatically fetch the codename):

Then install the version of Wine you wish to use:

Based on Wine Development (Stable) (eg: 4.0)

Based on Wine Development (Testing Stage) (eg: 4.1)

Based on Wine-Staging (Bleeding Edge) (eg: 4.1.1)

in the terminal to make sure it configures Wine correctly (In that order). You will also need to install winetricks (Another configuration package, really helpful for installing Windows components like .NET Framework and other needed libraries). So after this, please do:

Video Demostration showing Wine 1.9.X in Action — Wine 1.9.X Performance

1. Differences between Wine Stable, Development & Staging versions

Stable versions offer less bugs with better stability and receive updates every 3-6 months after release.

Development version is the next stable version in development and receives updates every 2 weeks.

Staging version is the same as Development Version but includes all patches and enhancements from Wine-Staging

The decision to stick with the stable version (Even number versions: 1.0, 1.2, 1.4. ) or with the unstable versions (Odd number versions: 1.1, 1.3, 1.5. ) is up to the user, the main difference is compatibility and performance which are both enhanced in the Development version. You get the latest fixes it offers, and also become a tester that can help in the development cycle.

2. Installing the Recommended Stable Wine version (from PPA)

In the terminal type the following to add the Wine PPA, update repositories, and install latest Wine & Winetricks version:

or you could include the Wine 32-Bit Arch (Better support) and configuring winecfg (This should only be applied to new installations since it will move the existing Wine installation to a folder called winebck):

3. How to know which components an application needs

To find out what components an app needs, look in the Wine Application Database. It lists if the application is usable, what components it needs and how to install them.

4. How to install additional components, DLLS and Libraries to Wine

To have a working and enhanced Wine environment for your games and apps, I suggest you use winetricks to install additional components which offer better compatibility with games. To have a better working system do the following here is an example for HL/HL2 (Non-Steam. For the Steam Version go here: How can I install Steam? . Know that Half-Life and HL2 are natively supported in Ubuntu):

To play HL/HL2 you need the Wine PPA as mentioned above. After opening winecfg at least once on the terminal, open winetricks by running winetricks —gui then follow this steps:

Select Select the default wineprefix

enter image description here

Select Install a windows DLL or component

enter image description here

Install all that I have marked (and any additional you need). This covers many apps:

enter image description here

enter image description here

enter image description here

enter image description here

Right click the installer for HL/HL2 and select Open with Wine. Both games should work perfectly. This applies to apps in general and depending on the app you will need to install more or less components.

You can also install each component in terminal by adding the name of the component after the winetricks command:

winetricks vcrun2010 — Will install vcrun2010 using winetricks

winetricks xna40 — Will install xna40

5. Troubleshooting a Wine App

Sometimes, when running an App one or several of the following can actions can happen:

  • Frozen App
  • Wine opens a Blue window for a moment and then closes it
  • Nothing appears to happen
  • Inside the Wine window everything is Black in the start or at some point
  • DLL, Video card or Component not recognized

For most of this problems there are solutions. Here are the recommended steps for you to start troubleshooting your way into a Wine app:

Always visit the Wine App Site to see what other testers have done to make the App work. For example here is me testing Dead Island: Riptide which I gave it a Bronze since after the selecting the character the whole game went to a Black screen. What I did to test out what was happening was to go to the terminal and run the game from there. In the terminal some of the errors suggested I was missing a vital piece for the game to work. After reading the error output and doing what it suggested (Replacing a corrupted DLL) I could install a component the game needed and the game worked perfectly.

Knowing what the game needs is crucial to getting the game working correctly. Setting the winecfg options and OS environment is only a small part. This is only creating the environment for the app. You need to add other functionality like DirectX, XNA, .NET Framework and more that the app might need in order to work. These are key components for some apps. Without them, even if some apps work correctly, others will not. Making sure you have all of this components gives you a higher chance of complying with what an app needs.

As you can see from my Dead Island test I added several winetricks packages and also installed 3 packages the games comes with (DirectX, Windows Media Format and Microsoft Visual C++ 2010). With this I managed to guarantee that the game would start and be playable.

Some apps are only created for certain Windows versions as seen with Dungeon Keeper. To specify a particular Windows Version for a particular app you can open winecfg navigate to Applications and select Add Application, then search for the applications executable file and click on Open. Now select the application from the list and then change the Windows Version for it. This way, only this application will have an specific version of Windows assigned to it, instead of globally changing the Windows version for all apps.

Changing the Windows version globally can affect apps that were installed with a different Windows version. For example, Installing Terraria in a Windows XP environment and then changing it after playing to Windows 7 will give you one of two errors, one, not finding the saved games and two not running the app.

Running an app to diagnose what the problem can be done through the terminal which is the best way by far to know what the app is doing or needing. The app can tell you information like:

What missing DLL it needs to run (mscore.dll, steam_api.dll)

What missing component it needs to run (XNA, DirectX, .NET. )

If the problem is you are using a 64 Bit environment instead of a 32 Bit

If you need to add a parameter for the app to run

For missing DLLs I suggest using dll-files to download specific DLLs missing that are needed for the APP. Normally you can paste this DLLs inside the game folder or in the Windows/System32 folder (Or both) and that should solve the problem. For missing components use winetricks .

When troubleshooting an App, always run the app in an emulated Desktop Window. Open winecfg go to Graphics and enable Emulate a Virtual Desktop. Then set the resolution for it. This way, if the app freezes, hijacks the keyboard and/or mouse focus, at least you have a way to eliminate the app instead of having it fullscreen where you have few choices:

enter image description here

For freezing scenarios of an app at fullscreen I suggest activating the "Kill X" feature that is found in the Keyboard Layout Window which can save you several seconds of time when trying to get out of a frozen Wine app:

enter image description here

Another technique of getting out of a frozen state is either opening a terminal and type wineserver -k or killing the X server. To do this firs configure it by running sudo dpkg-reconfigure keyboard-configuration and on the last option there that talks about killing X, say "YES". This will enable the CTRL + ALT + BACKSPACE combination.

Remember that if an app needs a minimum or recommended hardware requirement in Windows, it will also need the same on Linux. If the app needs 512 MB of RAM and a 2.0 Ghz CPU, it will need the same on Linux using Wine.

Sometimes you will come across an app in an ISO or any other Image format that you can not manage to open or install. Ubuntu comes with several tools to open this files but the best one I have tried so far is CDEMU which covers several types of images that bring Multi-Sector or Protected format. This is the closest you will get to something similar to DAEMON Tools. Cases like The Sims 3, Simcity 2000 and others can only be opened and installed using this app. More info in Apps capable of mounting/unmounting CD/DVD Images with multi-sector or protected format

For cases where an specific app is not running, showing graphical glitches, black screen or not running with full graphics I actually recommend reading one of the following links that applies to the end user for video support:

Apart from checking the above, if you have the correct drivers I would also add that you need to check if your video card has OpenGL support. For this I would first install mesa-utils if not yet installed:

sudo apt-get install mesa-utils

to test for OpenGL support. Simply run a check to see if you have OpenGL support:

glxinfo|grep ‘direct rendering’

which should say Yes if you do have support. Another alternative would be:

Lastly, you can run glxgears to give you an idea of how your video card renders and its FPS for the render. Another very important point is to run the application from the terminal as in wine AppName.exe , this way it will show what the problem is.

If the Unity Launcher is not hiding itself when running a Wine app or is moving the app to the right you can do one of 2 things:

Hold the ALT key and click and drag the Wine to the Left

In the appearance option select "Auto-Hide The Launcher" and set the sensitivity to a level you like. This way the launcher will hide when the mouse leaves it’s area.

enter image description here

Shader Model 3.0 is not recognized in Wine (Including Steam games)

There are games that require Shader Models and output an error similar to Required OpenGL extension GL_EXT_texture_compression_s3tc. To fix this simply type the following in the terminal:

sudo apt-get install libtxc-dxtn-s2tc0 ( note in recent version of Ubuntu libtxc-dxtn-s2tc0 is not longer needed )

Wine has come a LONG way from the days where newer games could not be played. It has gotten to a point where playing in Ubuntu is effortless. Wine has even some support for SM4.0 and DirectX 10/11 on Wine 1.6. If the problem persists it means that either your video card does not support this or you are missing the correct libraries.

Another reason that Wine might not detect Shader Model is because it might be set to Disabled in the Winetricks. Open the Dash and type winetricks . Select your wineprefix then Change Settings. Then look for the glsl=enabled option and select it. This should solve the Shader Model issue. Cases like the game Limbo are solved this way.

6. How do I open multiple Wine apps without them using the same Window (Overlapping)

You can setup multiple Wine windows by adjusting some Wine parameters before starting each individual Wine program. The fastest way is to open the terminal where the executable of the app you want to run exists. Let us assume it is the Wow.exe app. Then simply type the following:

This would open the Wow.exe executable with a Window titled "WOW", a resolution of 1024×768 for that specific Window and it would apply the parameters -opengl and -console to the Wow executable. Now assuming you have the game installed somewhere else, you would the following change:

This executes Wow.exe assuming it resides in the folder wow inside a partition called fun in your /media/USER folder. The output should be similar to this when running for example 4 apps:


There is a more easier way to accomplish this. The idea is to create a Desktop shortcut by right clicking on the Desktop and selecting New Document —> Empty Document. This should create an "Untitled Document" file on your desktop. Now open the file and paste in it the following:

Now save it and rename the file to the application you want to open but at the end add ".desktop". It will turn into an "Executable Windows Icon". Now right click the Icon again and go to Properties —> Permissions —> Activate Allow executing file as program. Now go to the Basic Tab and insert the information you need to execute that wine app. The end result should be something like this:

enter image description here

7. Does having Ubuntu 64 bit influence Wine

Yes, having Ubuntu 64 Bit will also set Wine as 64 bit. This will create several problems for many Windows apps that only work on 32 Bit, for example not being able to install several of the .NET Frameworks since they will only work on the 32-Bit version, which will result in the user not being able to run many Windows applications. To solve this you need to do the following after having succesfully installed the PPA version as I mentioned above. Immediately afer installing the PPA wine package and before opening winecfg open the terminal (Make sure you are at your home folder by typing cd

) and type the following:

Change USER with your user account. For example in My case, that line would read export WINEPREFIX="/home/cyrex/.wine"

With this method you have changed the Wine architecture to 32 bit and on the moment you open Winecfg, it will configure all the Windows versions available to 32 Bit.

8. Alternatives to Wine PPA

PlayOnLinux (PoL)

Although you can actually install and configure everything you need with Wine alone and it’s complementing apps (winetricks, regedit, explorer) using PoL can save you some trouble and time when installing an application. With PoL you can find a list of apps that you can select and install in it’s database:

enter image description here

and by simply selecting to install you achieve the following benefits:

Creating an independent container which holds the app installed, a specific Wine version for the app installed (In some cases, a specific Wine version works better for a specific app than the current Wine version).

Automatically installing any additional DLL and Components the app needs to function correctly.

Adding the appropriate registry keys the app needs

Create an independent way of running multiples apps without them overlapping each other with Windows version changes, regedit changed, specific Wine versions, etc..

Of course, it is important to know that PoL works side by side with Wine and it needs Wine to work correctly (It is based on it). In many cases, an app might not work with PoL but will work with the default Wine configurations I have mentioned in this guide. So if you find the app you want to use in PoL, great. But if you don’t find it, remember you always have the alternative to using the default Wine to install and configure the app.

The benefits of installing the app using Wine and installing it using PoL is that with Wine, you can access and execute the App using the DASH, like in the images below:

enter image description here(Terraria)

enter image description here(Dead Space & Dead Island)

CodeWeavers CrossOver (CC)

CC is very similar to PoL on how to install and configure apps. The main difference is that CC offers official support. They even have their own CodeWeavers Database which holds more than 10.000+ apps. Not only that but they have a ranking system similar to the one in Wine’s AppDB. They have also contributed to the development of Wine some of which you can see in their Support.

DosBox (DB)

DB is to MS-DOS apps as Wine is to Windows apps. With DB you can run MS-DOS apps in your system. Simply install the dosbox package and you are done. Running an app is as simple as going to the folder where the app resides and executing the following:

This will open the current folder as a drive letter on the DB environment.

You can also mount a folder by doing the following after opening DB:

Will create the C: Drive letter which contains the Dune2 folder. So if I simply execute dune2.exe I get the following:

enter image description here

9. What are some special parameters and tips I can use with Wine

There are a couple, for example:


wine —version — Shows the version of wine

wineserver -k — Kills all wine versions for the specific user. This is useful if your Wine app is frozen, took the whole screen and does not let you use Ubuntu, has the mouse or keyboard focused on it and other Wine issues that might appear with some apps.

wine explorer — Will open an explorer similar to the Windows Explorer

wine explorer /desktop=X,Y — Creates a virtual desktop where X is the name of the Desktop Window and Y is the resolution of the Window. For example: wine explorer /desktop=WOW,1024×768 Wow.exe

regedit — Will open the regedit version of Wine similar to the Windows one.

wine uninstaller — Will open the Add & Remove of Wine similar to the one in Windows. Here you will be able not only see which apps you have install and uninstall them, but also be able to install new apps if you wish.

winetricks — Will open the winetricks app to install missing Libraries, DLLS and Components essential for the correct functionality of many Windows apps.

winecfg — Will open the Wine Configuration where you can set Video, Sound and Windows version.

wine ipconfig — Shows you the IP that Wine can see. Similar to ipconfig.

wine netstat — Shows you the IP/Port connections made. Similar to netstat.

wine start — Sets the working directory for the executable. This option helps in cases where the executable only works from the same folder and not from a full path. An example is if you wanted to run a .bat file or simply execute a command from another folder (eg: Parent folder), you would do something like this, assuming we are not in the same folder as MetroLL.exe:

This would do two things, it will first set the directory to the Metro Last Light folder and then it would run the MetroLL.exe mentioned at the end. This is similar as running the executable from the same folder but it has the advantage of running the app from any other place. The thing to know here is that:

  • Wine does not like Unix paths, so you need to separate folders with \\ instead of \
  • You need to use an absolute path. You need to start from C:\\ to make sure the executable will always work as it should.
  • If the executable is outside the C: drive, then add the corresponding letter. For example, to execute a Windows binary outside of Wine, you would use the Z:\\ letter since Z: normally points to the Linux system’s root directory.
  • If in doubt ask the command for help with the /? parameter, (eg: wine start /? )

export WINEPREFIX — This variable is used to change the Wine Prefix to another location. For example if you wish to merge PoL and Wine (Not recommended since PoL has multiple Prefixes) you can do the following:

Where PREFIX is the one you want to merge with Wine. You would have to run winecfg again.


When dealing with a folder tha has spaces (eg: World of Warcraft), you can execute the Wow.exe file by adding the \ symbol in front of every space, this escapes the symbol. The end result would be something like "World\ of\ Warcraft\Wow.exe". If you do not want to add this escape symbols to your line of code, simply double quote the entire link, so it looks like:

wine explorer /desktop=WOW,1024×768 "/media/cyrex/My Partition/World of Warcraft/Wow.exe" -opengl -console

as you can see, there are 2 folders with spaces in them, "My Partition" and "World of Warcraft", but since I quoted the whole string, the need to include escape characters is not needed. If you wished to use the Wine Path (eg: C:/) then all slashes would be a double slash (eg: "C:\Program Files\App").

Parameters that are applied to an app should always be OUTSIDE the quoted strings. Using the example above, we can see -opengl and -console outside the quotes.

When dealing with apps that take hold of you mouse and/or keyboard, you can use wineserver -k to kill the app, or simply opening the App in Windows mode or setting the Windows mode with the wine explorer /desktop parameter will save you from having this mouse/keyboard problems.

10. Stability, Performance and App Support Wine offers to end users


I have tried Wine since 2005 and seen how the developing process in Wine under Ubuntu has been quickly catching up to the latest games.

Before Wine 1.2 came out around 2012, it was difficult to get many apps working on Wine, but after Wine 1.2 came out it was a totally different result. Even more so after 1.4 came out in 2012, 1.6 in 2013 and then 1.8 in 2015. Many cases started to appear where they would work out of the box. Cases like Deep Space 2 which is/was one of the latest games I could play at that moment and which I tested 3 days after it was released. Alice in Wonderland (The new one I mean), The Sims 3, World of Warcraft, Amnesia and others. Even Skyrim could be played. These are games that demand powerful graphics and you can play them with little to no additional setups other than the normal install provided above.

To know what games you can play on Wine I recommend visiting the Wine App Database: http://appdb.winehq.org/ which holds more than 10K+. This includes information about their performance & stability and it helps in knowing if a game is playable.

The Wine App Database also offers a Ranking which determines what games can be played with less issues, if any. When you see this ranks, you have an idea if the App will work or not. Mind that you need to also take into consideration what hardware and Wine version the tester shows on the Wine Database. The rankings are as follow:

Platinum Rank — Means you have an almost 100% chance the app will work out of the box.

Gold Rank — Means you might find yourself doing a little bit of configuring but it will work out at the end.

Silver Rank — Means that the app will run, but might have graphical, sound or control issues.

Bronze Rank — Means the app will not work correctly.

Garbage Rank — Means the app still does not work and probably will not even install. The only way you could make it work would be when Superman starts eating kryptonian cereal in the morning.

For reference, a couple of years ago the amount of Platinum games was less than 50. In 2012 you could find More than 1.5K games out of which almost 200 were in the Latest Titles. Today there are more than 6K+ Games of which 4K+ are Platinum. The more people that participate in testing Wine apps, the better. Main reason I always recommend using the PPA from Wine.


11. How to Uninstall Wine

Uninstalling Wine can be done in 2 ways depending on your needs. If you only need to "Reset" Wine to the default values, you can simply delete the .wine folder and then create it again by running winecfg . If you have apps on the .wine folder that you wish to backup, now would be a good time before deleting the folder. To delete the folder simply do the following and it will take care of the whole Wine environment:

Now if you want to actually uninstall Wine from Ubuntu, you can do the following, but note that this will NOT delete your .wine or cached folder:

sudo apt purge wine*

This would uninstall every package related to wine, including wine, wine1.9, winehq, winetricks and more. Basically removing anything related to wine.

Ubuntu WineHQ Repository

To make installing the latest version of Wine as easy as possible, WineHQ has its own Ubuntu repository. Should a newer version of Wine give problems, it is also possible to install an older version of your choice.

The WineHQ repository only offers packages for AMD64 and i386. I you need the ARM version, you can use the Ubuntu packages.


If your system is 64 bit, enable 32 bit architecture (if you haven’t already):

Add the repository

Download and add the repository key:

Select your Ubuntu version and download the WineHQ sources file:

Linux Mint 21.x

Linux Mint 20.x

Linux Mint 19.x

Update the package information:

Install Wine

Install one of the following packages:

Stable branch
Development branch
Staging branch

The WineHQ Wiki explains the differences between the branches.

Sometimes there are problems installing Wine. If your problem is not listed, search the forum or if you can’t find an answer ask your question.

Missing dependencies

Read the FAQ about dependency errors and tips for troubleshooting dependency issues. The most common issues are:

Third-party repositories

WineHQ packages are created and tested for a clean Ubuntu installation. Using PPAs or third-party repositories may prevent the installation of Wine. Often the problem is that these repositories are not multiarch. The required 32 and 64-bit packages are missing or cannot be installed side by side. The deb.sury.org repository is known for causing problems.

Downgrade the problematic dependency packages to the official Ubuntu version.

KDE Neon

Ubuntu 22.04 KDE Neon users report problems with the libpoppler-glib8 dependency. The solution is to downgrade this package to the official Ubuntu version. sudo apt install libpoppler-glib8:=22.02.0-2ubuntu0.1


Another cause may be the use of backports. A newer 64-bit version of a library is already installed, but the 32-bit version isn’t. These packages are given a lower priority so they will not be installed automatically. The solution is to manually install the missing 32-bit package from backports.


Older versions of Wine (prior to version 6.21) have FAudio as a dependency. These packages are missing on Ubuntu 18.04. These can be downloaded from the Open Build Service. For Debian 10, these packages are available in backports.

Winehq key problems

  • W: GPG error: https://dl.winehq.org/ . NO_PUBKEY 76F1A20FF987672F

Currently, the Wine servers are being synchronized. This means that some users still getting the older .sources file. If you get this warning, edit the winehq-<distro>.sources file and replace /usr/share/keyrings/ to /etc/apt/keyrings/.

For example: sudo sed -i s@/usr/share/keyrings/@/etc/apt/keyrings/@ /etc/apt/sources.list.d/winehq-focal.sources

  • The WineHQ repository key was changed on 2018-12-19

If you downloaded and added the key before that time, you will need to download and add the new key and run sudo apt update to accept the repository changes.

  • Apt-key is now deprecated

Previously, apt-key was used to add the Wine key. If you get this warning, remove the Wine key with: sudo apt-key del «D43F 6401 4536 9C51 D786 DDEA 76F1 A20F F987 672F» And remove the the line about the WineHQ repository from /etc/apt/sources.list(.d/*).

Mirror sync in progress?

If you get an error message when trying to install a package from WineHQ that includes the line Mirror sync in progress? that is most likely the problem. There are many packages to sync, and it can take a long time to complete.

Wait a few hours, and try again. If the problem persists for more than a day, file a bug.

My Ubuntu version is not listed

When a version of Ubuntu is no longer supported, no new Wine packages are made. Check the WineHQ server to see if there are older packages are available. Because no new versions are made, adding the WineHQ repository is not necessary. Downloading and installing the four WineHQ deb packages is sufficient.

Please note that these packages are no longer maintained and are no longer supported.


  • Menu items are not created for Wine’s builtin programs (winecfg, etc.). If you upgrade the Wine distro packages that had added them, they will be removed. You can recreate them yourself using your menu editor.
  • The Wine files are installed in /opt/wine-<branch>/
  • WineHQ does not offer wine-gecko or wine-mono packages. When creating a new wineprefix, you will be asked if you want to download those components. For best compatibility, it is recommended to click Yes here. If the download doesn’t work for you, please follow the instructions on the Gecko and Mono wiki pages to install them manually.
  • Beginning with Wine 5.7, the WineHQ packages have an optional debconf setting to enable CAP_NET_RAW to allow applications that need to send and receive raw IP packets to do so. This is disabled by default because it carries a potential security risk, and the vast majority of applications do not need that capability. Users of applications that do need it can enable CAP_NET_RAW after installing Wine by running dpkg-reconfigure wine-<branch>-amd64 wine-<branch> wine-<branch>-i386 and answering yes to the three questions.
  • Binfmt_misc registration is not added. Consult your distro’s documentation for update-binfmts ( man update-binfmts ) if you wish to do this manually.
  • A complete Wine installation on a 64-bit system consists of four packages.
  • There are several versions of Wine on the repository. The latest version is installed by default. Usually, the latest version is recommended. However, it may happen that an older version is desired. Use apt policy winehq-<branch> to list the different available versions.

bookworm-1 When the Wine packages are downgraded, all four Wine packages must be downgraded. sudo apt install winehq-staging=7.12

Installing without Internet

To install Wine on a Ubuntu machine without internet access, you must have access to a second Ubuntu machine (or VM) with an internet connection to download the WineHQ .deb package and its dependencies.

On the machine with internet, add the WineHQ repository and run apt update as described above.

Next, cache just the packages necessary for installing Wine, without extracting them:

sudo apt-get clean

sudo apt-get —download-only install winehq-<branch>

sudo apt-get —download-only dist-upgrade

Copy all of the .deb files in /var/cache/apt/archives to a USB stick:

cp -R /var/cache/apt/archives/ /media/usb-drive/deb-pkgs/

Finally, on the machine without internet, install all of the packages from the flash drive:

How to Install Wine on Ubuntu

Wine is an application that allows you to run Windows programs on a Linux system. Wine is similar to an emulator, but with a different technology that improves performance.

In this tutorial learn how to install Wine on Ubuntu.

  • A user account with sudo privileges or Ubuntu 20.04
  • Access to a terminal window/command-line (Ctrl-Alt-T)

Install Wine from Ubuntu Repository

Step 1: Verify Ubuntu 32-bit or 64-bit system

Wine uses a different application for 32-bit and 64-bit versions of Ubuntu.

To view CPU details, enter the command:

The CPU op-mode(s) field tells you which architecture you are using:

CPU op-mode(s): 32-bit: You have a 32-bit OS
CPU op-mode(s): 64-bit: You have a 64-bit OS
CPU op-mode(s): 32-bit, 64-bit: You support both

Verify Ubuntu 32-bit or 64-bit system before installing Wine.

Step 2: Install Wine from Default Repositories

Installing Wine from the default Ubuntu repositories is the easiest option. However, be aware that it may not provide the latest version.

1. Start by updating the apt repository package list. This ensures the latest stable version of Wine is installed.

2. To install 64-bit Wine, enter the following:

To install 32-bit Wine, enter the following:

Step 3: Verify Wine Version Installed

After the operation completes, verify the installation by checking the running version:

Check Wine version to confirm installation.

Installing Wine from the official Ubuntu repository will always provide a stable install. However, the repositories may not include the latest versions.

Note Learn how to install FFmpeg on Ubuntu, a command-line tool that enables you to work with multimedia content.

Alternative Option: Install Wine From WineHQ Repository

If you need a more recent version of Wine, install it on Ubuntu from the developers’ repositories.

1. If you are using a 64-bit OS, start by enabling 32-bit architecture:

2. Then, update the repository again:

Enable 32-bit architecture to install Wine repository.

3. Add the GPG key:

Add the GPG key for the Wine repository.

4. Then, run the following commands to add the WineHQ repository to Ubuntu:

Add the WineHQ repository to Ubuntu.

5. Update the package lists:

6. Install the latest stable Wine release using the command:

Alternatively, to install the latest development release of Wine, use the command:

7. Verify the installation by running:

Verify Wine installation by checking Wine version on Ubuntu.

Note: The apt package manager typically handles any dependencies. If you get an error that a dependency is missing during the Wine installation, install each missing dependency with the command:

Then rerun the installation command.

How to Update Wine

Wine is updated frequently. To manually update wine, use the command:

Replace stable with devel for the developer version.

Stable releases come out every 10-12 weeks. Developer updates come out much more frequently.

By default, wine creates an installation directory in the home directory. It uses a virtual c:\ drive to interpret commands. You can find this directory at /$HOME/.wine/drive_c/ .

How to Uninstall Wine From Ubuntu

To uninstall wine:

Instead of wine[version] , type wine64 , wine32 , wine-stable or wine-dev according to the version you have installed.

That command removes Wine, but not its dependencies. To remove all unnecessary dependencies, run the command:

Removal of these remaining folders needs to be done manually. Run the following commands:

Now to correct any installation errors, run:

Wine should now be totally removed from your system.

Get Started Using Wine

To set up the configuration directory for Wine, run the following command:

The command creates the

/.wine directory and initializes all the components.

Launching Applications

If you’re running a GUI on Ubuntu, double-click a Windows.exe file to launch it. Wine automatically associates itself with the .exe file extension. You can also right-click the application and select Open With > Wine.

To launch an application from the command line, enter the following:

It’s essential to change the working directory to the location of the application files. Replace program_folder with the actual directory that holds the application. Replace launcher.exe with the executable file for the application.

wine start Command

The wine start command is more robust than the basic wine command. It allows Wine to handle the working directory. Use it to specify a path to a specific location:

Specify a Linux path:

Use the wine or wine start command to launch the installer for the Windows application.

To download an installer to a local directory, use wget and then use the wine command to launch the installer. The application installs as it would on Windows. When installing from a disc, use the wine start command to specify the path to the installer. Use this to change drives in the middle of installation, if needed.

For security, do not run wine as a root user. Doing so can allow viruses and malware to infect your system.

Wine is a powerful tool that allows you to run Windows programs in Linux. This guide provides a solid start for installing and running wine on Ubuntu.

If you are using a different flavor of Linux, we have this tutorial also available for CentOS 7.

How To Install Wine 8.0 on Ubuntu 22.04 & 20.04

Wine (Wine Is Not an Emulator) is an open-source application that provides compatibility with running software developed for Microsoft Windows on Unix-like operating systems. With the help of Wine, you can run Windows software on a Linux system. The development team has recently released the latest Wine 8.0 version that is available for installation on Ubuntu systems.

This tutorial helps you to install Wine on Ubuntu 22.04 and Ubuntu 20.04 LTS Linux systems. The Winehq team provides PPA for installing Wine on Ubuntu systems. So we will use official wine PPA for the package installation.


You must have sudo privileged account access to the Ubuntu system.

Step 1: Configure Wine PPA

First of all, The systems running with the 64-bit architecture need to enable 32-bit architecture.

Then, download and add the repository key to your system.

After that, use the following commands to enable the Wine apt repository in your system.

  • On Ubuntu 22.04 (Jammy) LTS:
  • On Ubuntu 20.04 (Focal) LTS:

This will configure the Wine PPA on your Ubuntu system.

Step 2 – Installing Wine on Ubuntu

Your system is ready for Wine installation. Use the following commands to install Wine packages from the apt repository. The —install-recommends option will install all the recommended packages by stable versions on your Ubuntu 20.04 system.

That’s it. This will install Wine on your Ubuntu 22.04 or 20.04 system along with all required packages.

Step 3 – Verify Installation

Wine installation has been completed successfully on your Ubuntu system. Use the following command to check the version of wine installed on your system.

Step 4 – Using Wine (Optional)

To use wine we need to login to the GUI desktop of your Ubuntu system. After that Download, a windows .exe file like PuTTY on your system and open it with Wine as below screenshot or use the following command.

You can also launch the application by right click on the file and selecting Open With Wine Windows Program Loader. If you don’t see this option, check this option under “Open With Other Application”.

Launch application with Wine

During the first startup, Winehq configure user specific environment.

Winehq initial configuration

After that, It will prompt you to install some required dependencies. You can install or skip them based on your requirements.

Winehq install mono

Finally, the application will start with Wine.

Running exe with Wine on Ubuntu

Due to the initial configuration, Wine will take some time to start application at first. The subsequent application launch will be quicker than the first time.


This tutorial helped you to install and use Wine on Ubuntu 22.04 and 20.04 LTS Linux systems. Now, you can run Windows applications on your Ubuntu system.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *