Creating and using a Wine prefix on an Ubuntu Linux system

A Wine prefix is a directory that acts like a separate Windows installation. Each prefix has its own registry, installed programs, libraries, and configuration, providing a way to isolate applications and configure Wine in a way that is optimal for a particular Windows application or set of applications without affecting other Windows applications that you need to run on the system. To create a new Wine prefix, take the following steps:

Create a new Wine prefix

Open a terminal window.
  1. Choose a location for the new prefix. For example:

    export WINEPREFIX="$HOME/.wine-myapp"

  2. Initialize the prefix:

    WINEPREFIX="$HOME/.wine-myapp" wineboot

    Wine will create the directory and initialize a fresh Windows environment.

Create a 32-bit prefix (optional)

If you need a 32-bit environment (for older applications), create it before the prefix is initialized:

WINEARCH=win32 WINEPREFIX="$HOME/.wine-32" wineboot

Note: Once a prefix has been created, you cannot change its architecture from 32-bit to 64-bit or vice versa. You would need to create a new prefix.

Configure the prefix

Launch the Wine configuration tool, winecfg:

WINEPREFIX="$HOME/.wine-myapp" winecfg

From the tool, you can:

Install an application into the prefix

E.g.:

WINEPREFIX="$HOME/.wine-myapp" wine setup.exe

.

Or, if the application is installed with a Windows Installer, i.e., a .msi file:

WINEPREFIX="$HOME/.wine-myapp" wine msiexec /i installer.msi

Verify the prefix

You can confirm the prefix exists:

ls "$HOME/.wine-myapp"

You should see directories such as:

drive_c
dosdevices
system.reg
user.reg

Tips

When you are creating the Wine prefix, you may see output like the following:

alice@Wonderland:~$ export WINEPREFIX="$HOME/.wine-publisher"
alice@Wonderland:~$ WINEPREFIX="$HOME/.wine-publisher" wineboot
wine: created the configuration directory '/home/lisa@ad.moonwillowwoods.com/.wine-publisher'
002c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
004c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
0054:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
004c:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
004c:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
004c:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0054:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0054:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0054:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0054:err:ole:start_rpcss Failed to open RpcSs service
009c:fixme:file:NtLockFile I/O completion on lock not implemented yet
009c:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00a4:fixme:file:NtLockFile I/O completion on lock not implemented yet
00a4:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00a4:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
00a4:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
009c:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
009c:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0108:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
002c:err:setupapi:do_file_copyW Unsupported style(s) 0x10
002c:err:setupapi:do_file_copyW Unsupported style(s) 0x10
012c:err:setupapi:do_file_copyW Unsupported style(s) 0x10
002c:err:setupapi:do_file_copyW Unsupported style(s) 0x10
012c:err:setupapi:do_file_copyW Unsupported style(s) 0x10
alice@Wonderland:~$

Here's what the various messages generally mean:

Message Should you worry? Explanation
fixme: No These are Wine developers' notes indicating that a Windows feature is only partially implemented. They are extremely common.
Microsoft.Windows.Common-Controls Usually no Wine couldn't find a Windows side-by-side assembly. Many programs don't care; some installers may look slightly different or lose visual styles.
err:ole: / Failed to open RpcSs service Usually no during initialization Wine's COM/RPC infrastructure isn't fully running yet. These often appear when creating a fresh prefix.
NtLockFile No Unimplemented asynchronous file locking. Rarely affects applications.
NtQuerySystemInformation No Program requested Windows performance information that Wine doesn't fully implement.
msi:internal_ui_handler No Wine's MSI installer UI handling isn't complete. Often harmless.
WM_ERASEBKGND not supported yet No Cosmetic GUI message.
setupapi:do_file_copyW Unsupported style(s) 0x10 Usually no Wine ignored a Windows file-copy option. Most installations continue normally.