I'd like to install a very old version of Wine (2.18)... So, instead of compiling the Wine source code, I'm trying to do it with PlayOnLinux. On its interface, we can choose among different Wine versions:

enter image description here

However, the result of the command wine --version on my terminal is:

wine-6.0.3 (Ubuntu 6.0.3~repack-1)

I'd like to access the command line of Wine 2.18 that I've installed on PlayOnLinux interface, not the Wine 6.0.3... I'm not sure if I understood how PlayOnLinux works... Is it possible to do this using PlayOnLinux? Or I'm supposed to use Wine only from the graphical interface when I use PlayOnLinux?

Additional Information

I'd like to use Wine from the command line because the Windows tool that I'll run is also a command line. I know on Wine we can execute exe files directly from the command line, but playonlinux doesn't have many options on the terminal, that's why I'm assuming there's a way of accessing its Wine somehow...

2 Answers 2


Yes, PlayOnLinux is a GUI-centric app. Yes, it is possible to use POL's wine and apps outside of POL. Why do you even need wine 2.18, it's old and most likely very broken? What is the tool that you're using? Maybe it could be installed in a better way or there is a linux version/good alternative.

There is a directory in your home dir called .PlayOnLinux. Inside are several folders, but we're only going to need wine and wineprefix. Inside the prefix, locate the prefix root - it always contains the drive_c folder, and run export WINEPREFIX=$PWD. This is going to set an environment variable to point to the prefix that you want to operate in. Then, go to ~/.PlayOnLinux/wine and locate the wine executable. It should be in a bin folder. Then command ./wine cmd, and navigate to C:. It should then get you to your prefix, where you could use the tool to your heart's content. When you're done, just exit.

  • This approach will indeed allow you to run windows executables, but it will miss for example the drives you have configured in your wineprefix. The nice thing of this solution is that you stay in your linux terminal, with the wine/windows shell cmd.exe. I will post a solution that gives you full access to the wineprefix.
    – db-inf
    Commented Dec 4, 2022 at 19:46

Savchenko Dmitriy's answer here explains how to get a Wine command shell in your Linux terminal. A problem with this solution is, however, that you are not working in the full wineprefix as configured in PlayOnLinux. You have, for example, no access to all the Windows drives you configured, and I don't know what else.

You can open a real Wine/Windows terminal, a command prompt it is named in Windows jargon, if I remember well, by using PlayOnLinux itself, which gives you the full wineprefix experience. For that, I configured a PlayOnLinux shortcut with as name "Win7x86PROGS console" to run in my wineprefix named "Win7x86PROGS" as follows:

#!/usr/bin/env playonlinux-bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/db-inf/.PlayOnLinux/wineprefix/Win7x86PROGS"
export WINEDEBUG="-all"
cd "/home/db-inf/.PlayOnLinux/wineprefix/Win7x86PROGS/drive_c/windows/command"
POL_Wine start.exe "$@"

The WINEPREFIX path must be absolute (I am db-inf), the cd path can be ~/.PlayOnLinux/... instead. The wine program start.exe will try to open the file specified as "$@", according to Windows settings, or when "$@" is empty or specifies a DOS or Windows CLI executable, it opens a console to execute that. Thus, you can open the console in the wineprefix, and run for example your old McAfee virus scan, as follows:

$ playonlinux --run "Win7x86PROGS console" 'G:\PROGRAMS\McAfee\scan'

with Windows path and path-syntax (single quotes to retain the backslashes), or with Linux path (with the Windows G:-drive as configured in my wineprefix) as follows:

$ playonlinux --run "Win7x86PROGS console" "/opt/.win-gdrive/PROGRAMS/McAfee/scan.exe"

PlayOnLinux will convert the path to use the wineprefix's configured drives. Once the child program is finished, start.exe will close the console. That can be a nuisance. The shell command cmd.exe by itself would not open a Windows console, but you can use it to keep start.exe's console open, like this:

$ playonlinux --run "Win7x86PROGS console" cmd /K "/opt/.win-gdrive/PROGRAMS/McAfee/scan.exe"

or in Windows style, where case does not matter and where you can omit the .exe file extension:

$ playonlinux --run "Win7x86PROGS console" cmd /K 'G:\PROGRAMS\MACafee\sCaN'

It is cmd's option /K that will keep the console open.

I even configured a desktop file, associated with mime type application/x-ms-dos-executable, to start Windows console programs from my Linux file manager.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .