Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm trying without success to open windows registers from command line in Ubuntu. I don't want to use wine or the tools I've read on the web. I'd simply like to do something as:

$vim (or sudo vim) registry-file

and being able to watch the contents and in case modifying it. The problem is I don't know where to find them (I mean the path).

I have a dual boot and I have mounted Windows with the command:

$ sudo mount /dev/sd3 /media/Windows

but now I can't find the registers.


share|improve this question

closed as off topic by Rinzwind, MestreLion, mikewhatever, hhlp, Mik Nov 22 '12 at 17:51

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

What you're asking is a question about modifying the windows registry, which doesn't really have much to do with Ubuntu. You should try asking this question on the Superuser Stack Exchange site. – jackweirdy Nov 22 '12 at 13:23
The windows registry is not a plaintext file. Unless there is a vim plugin, you won't be able to edit it. You can use chntpw for registry editing under Linux. – Lekensteyn Nov 22 '12 at 13:29
Not possible. For security reasons, the Kernel32.dll protects these files from being copied or altered without the use of the Kernel32.dll. – Rinzwind Nov 22 '12 at 13:31
Wrong, Luigi: you cannot, even under windows, modify the registry of an arbitrary partition. You can only edit (using regedit) your current registry. Since Ubuntu has no current registry, it makes no sense to have an editor for that. – MestreLion Nov 22 '12 at 13:58
In other words: if you know how to modify the registry of a different partition than your current, under windows, I'd love to hear how ;) – MestreLion Nov 22 '12 at 14:01

2 Answers 2

See for the locations of the hive files - but, that won't really help you with what you want to do.

The Windows registry hives are databases, not plaintext files, and cannot be effectively edited or monitored with tools intended for plaintext files. Windows' own regedit.exe is generally the easiest way to manage registry hives; see for information on using regedit.exe from the command line to export and import registry keys (or entire hives) to and from plaintext .REG files.

If you absolutely must do offline editing of the registry directly, there is an open source Linux application to do so - see, which is normally used for password resets but can in fact be used to directly edit any part of the registry you would like to.

It might be more helpful for you to restate your question to more explicitly tell us what you want to accomplish, though.

share|improve this answer
Thanks, at least with your answer I understood a little more the topic :-) – Luigi Tiburzi Nov 23 '12 at 9:10

You cannot "find the registers" because the Windows Registry is not a single text file.

It is an abstract entity that a running instance of windows creates on-the-fly, using information from many sources. One of these sources is a file in usually in C:\windows\system32\config\sam, but this file is not easily accessible, and is encoded with an undocumented binary format.

Some tools, like chntpw mentioned by Rinzwind and Jim Salter, were able to partially figure out the binary format, and thus allow basic editing. But, as the author repeatedly says, this is not 100% reliable: the reverse-engineering is incomplete, and microsoft can change this format anytime.

Even Windows, using regedit, can only partially manage foreign registries - you can load and unload the HKEY_LOCAL_MACHINE and HKEY_USERS hives of other registries, but not HKEY_CLASSES_ROOT.

This limitation is true for regedit.exe running under Wine as well - you can use it to load, edit, and unload HKLM and HKU from your Windows registry, but not HKCR.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.