Table of contents

List of Wine commands

Published on Feb 3, 2021 by: Ahmed Elsayed

Updated on Feb 18, 2021

 wineboot

wineboot performs actions that would normally be done during startup and shutdown on a Windows operating system.

wineboot will automatically update the WINEPREFIX directory after upgrading to a new Wine release.

Also, some applications use system calls to restart the computer. Under wine, they end up calling wineboot.

 How to use wineboot

wineboot [options]

 List of wineboot options

Option Usage
-i Perform initialization for first Wine instance
-e End the current session cleanly
-f Force exit for processes that do not exit cleanly
-k Kill running processes without any cleanup
-r Restart only, do not do normal startup operations
-s Shutdown only, do not reboot
-u Update the wineprefix directory

You can combine options together, for example: if you want to execute Wine shutdown, and force exit for processes that do not exit cleanly, you can combine them like this:

wineboot -s -f

 wineserver

According to winehq's Wiki:

  wineserver is a daemon process that provides to Wine roughly the same services that the Windows kernel provides on Windows. It is normally launched automatically when starting Wine, so you shouldn't have to worry about it. In some cases however, it can be useful to start wineserver explicitly.  

 How to use wineserver

wineboot [options]

 List of wineserver commands

Option Usage
-d0 Set debug level to 0 (0 means no debugging information)
-d1 Set debug level to 1 (1 is the normal level which is the default value)
-d2 Set debug level to 2 (2 is for extra verbose debugging)
-f Make the server remain in the foreground for easier debugging.
-k Kill the currently running wineserver
-p[n] Specify the wineserver persistence delay.

[n] is the amount of time that the server will keep running when all client processes have terminated. The timeout [n] is in seconds, the default value is 3 seconds.
-w Wait until the currently running wineserver terminates.

It is adviced to use the foreground option with the debug option, and you can use them together like this:

wineserver -d2 -f & wine [location-of-the-application]/[application.exe]

Or

wineserver --debug=2 --foreground & wine [location-of-the-application]/[application.exe]

 wine regedit (Wine Registry Editor)

The Registry or Windows Registry contains information, settings, options, and other values for programs and hardware installed on all versions of Microsoft Windows operating systems. Registry can be edited on Windows using Regedit.exe

Wine developers created a similar application to the Windows Registry with the same name (Regedit) to do everything Regedit does on Windows, and they also decided to store all of the settings you change in winecfg to the registry aswell.

 How Wine stores registry settings

Wine stores registry settings like this:

HKEY_LOCAL_MACHINE    ~/.wine/system.reg

HKEY_CURRENT_USER    ~/.wine/user.reg

HKEY_USERS\.Default    ~/.wine/userdef.reg

 How to open regedit

Open the terminal, and type this command:

regedit

or

wine regedit

 How to import a registry file

1- Open Regedit as I mentioned before

2- From Registry menu pick Import Registry File...

How to import a registry file image1

3- Choose the file you want to import, and click Open.

How to import a registry file image2

Or:

Open the terminal, and type these commands:

cd [location_of_the_file]

wine regedit [name_of_the_file.reg]

 How to export a registry file

1- Open Regedit as I mentioned before

2- Explore until you pick the folder containing the registry keys you want to export, then right-click on it, and pick Export...

How to export a registry file

3- Type the name of the file in the File name field, and click save.

 winefile

winefile is the Wine file manager, with a similar design to early Microsoft Windows explorer.

winefile

 How to open winefile

You can open Wine File Manager by typing this command in the terminal:

winefile

You can pass winefile either a Unix or Win32 path, for example:

winefile /media

winefile "C:\Program Files"

 wine explorer

explorer does one of two things:

1- Provides an alternative method of starting winefile. Simply put, it accepts parameters similar to the explorer provided by Windows then uses them to call winefile.

2- Creates a named virtual desktop which programs can run under.

Wine Explorer

 How to open Explorer

Open the terminal, and type this command:,

wine explorer

Explorer can be used to browse the files, and you can open any file if there is an application installed on Wine to open this extension.

 wine taskmgr (Task Manager)

taskmgr is similar to Task Manager, previously known as Windows Task Manager which is a task manager, and system monitor included with Microsoft Windows systems. It provides information about computer performance and running software, and you can start and stop services, and forcibly terminate processes.

 How to open taskmgr

Open the terminal, and type this command:

wine taskmgr

Wine Task Manager

 wine uninstaller (Add/Remove Programs)

uninstaller is a GUI uninstaller for all setup programs that put an uninstall entry in the registry, e.g. InstallShield or the WISE installer. It's similar in function to Add/Remove Programs in Windows, except much simpler.

 How to install an application on Wine

Open the terminal, and type this command:

wine uninstaller

2- Click Install...

How to install an application on Wine image1

3- Locate the installation file .msi or .exe and click Open

How to install an application on Wine image2

4- Follow the Installation Wizard

How to install an application on Wine image3

You do not need to follow the first 3 steps to open .exe installers, because Wine assign itself to open .exe extension after installing Wine, but you will need to do that with .msi installers.

Installed application can be found at your Linux application menu under Wine ---> Programs

 How to uninstall an application on Wine

Open the terminal, and type this command:

wine uninstaller

2- Click on the application you want to uninstall, and click Modify/Remove

How to uninstall an application on Wine image1

3- Click Uninstall

How to uninstall an application on Wine image2

If the uninstalled application is still exists at your Linux application menu under Wine ---> Programs, open your Linux file manager, and go to this location: ~/.local/share/applications/wine/Programs and delete the folder of this program.

 wine control (Control Panel)

control is Wine's implementation of the Windows Control Panel.

Wine does not currently implement many of the control panel applets (.cpl files) typically found on a Windows system.

 How to open Wine Control Panel

Open the terminal, and type this command:

wine control

Wine Control Panel

 wine msiexec

MSI files cannot be run directly; you need to use either Wine's msiexec program or wine start from a terminal:

wine msiexec /i ~/Downloads/LibreOffice_6.1.0_Win_x86.msi

 wine start

wine start command can be used to start an application with a DOS or Windows style path

wine start "C:\Program Files\Scan Tailor\scantailor.exe"

 wine cmd (command prompt)

cmd is command line access into Wine, similar to Windows' cmd.

Once invoked in the terminal (by using 'wine cmd'), the current directory is displayed using DOS format. The system root is displayed as Z: and normal Unix forward slashes / are replaced by DOS backslashes \. Now, you can use any commands you use on Windows' cmd. You can also use cmd command to run Windows batch file.

 How to run Windows batch file on Wine

Open the terminal, and type this command:

wine cmd /c C:\mybatchfile.bat

 wine winehelp

winhelp views a Microsoft help file (.hlp)

 How to open Microsoft help file (.hlp) on Wine

Open the terminal, and type this command:

winhelp filename.hlp

 wine hh

hh is Wine's HTML help viewer (for help files with the .chm extension)

 How to open Microsoft help file (.chm) on Wine

Open the terminal, and type this command:

wine hh filename.chm

 wine eject

eject is a Wine command. It is used to free, unlock, and eject an optical device when Wine is using it.

In order to eject, the drive must be correctly set up in winecfg and must be invoked with Wine preceding it.

 How to use wine eject

To eject all CD/DVD drives, you can use this command:

wine eject -a

To eject a certain drive:

wine eject d:

d: is the drive letter of CD/DVD drive

 wine expand

expand extracts a file stored in a cabinet file (.cab)

 How to use wine expand

wine expand [source_file] [destination_file]

[source_file] is the file name of the cabinet file.

[destination_file] is the path and the filename of the file to be extracted.

 Sources

https://wiki.winehq.org/Category:List_of_Commands

If you want to know more about wine check these tutorials: