LinuxCommandLibrary

regedit

TLDR

Export a specific registry key and contents to a file

$ regedit -E [path/to/file] [path/to/registry_key]
copy

Delete a specified registry key
$ regedit -D [path/to/registry_key]
copy

Display help
$ regedit -?
copy

SYNOPSIS

regedit [-h | -v | -E | -e | -i] [-d <hex digits>] [filename]

PARAMETERS

-h
    Display help message and exit

-v
    Enable verbose output

-E
    Export selected registry branch to file (filename required)

-e
    Export whole registry or branch to file (filename required)

-i
    Import .reg file into registry (filename required)

-d <hex>
    Set root key to hex value (e.g., for HKEY_CURRENT_USER)

DESCRIPTION

The regedit command is a graphical tool provided by Wine, a compatibility layer for running Windows applications on Linux and other Unix-like systems. It allows users to view and edit the Wine registry, which stores configuration data mimicking the Windows Registry. This is crucial for troubleshooting Wine applications, adjusting compatibility settings, or importing/exporting registry hives.

Launched typically as regedit, it opens a tree-based interface similar to Windows' Regedit.exe, with keys, subkeys, and values (strings, DWORDs, binaries). Users can navigate hives like HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, add/delete entries, and modify permissions. It's essential for advanced Wine users but risky if misused, as incorrect changes can prevent applications from launching.

Requires a graphical environment (X11/Wayland via XWayland) and Wine installation. Command-line options enable batch operations like importing .reg files without GUI.

CAVEATS

Editing the registry can corrupt Wine prefixes, breaking applications. Always backup via wine reg export. GUI-only for interactive use; test changes in a new prefix. Not native Linux tool—requires Wine.

USAGE TIP

Run wine regedit if not in PATH; create isolated prefix with WINEPREFIX=~/.wine_new wine regedit.

FILE FORMAT

Supports standard .reg files:
REGEDIT4
[HKEY_CURRENT_USER\Software\App]
"Value"=dword:00000001

HISTORY

Introduced in early Wine versions (pre-1.0) to emulate Windows Regedit.exe. Evolved with Wine's maturity; current versions (Wine 9.x) support full hive editing, Unicode, and ACLs. Widely used since 2000s for game/app compatibility fixes.

SEE ALSO

wine(1), winecfg(1), regsvcs(1), winetricks(1)

Copied to clipboard