I have a dual boot windows 8 and Ubuntu on my Laptop.

Is it possible to read the Windows licence key under ubuntu? (I guess it is hidden in the Windows registry somehow)

  • Is it a UEFI system, If so, It's probably in the UEFT Key memory? – Amith KK Feb 22 '14 at 8:43
  • Yes, it is an UEFI System. I already found it and posted the ansewer below ;) – rubo77 Feb 22 '14 at 9:03
  • 2
    Reviewers: This is not off-topic. It is about using Ubuntu to find information in a Windows installation. Perfectly fine. – Seth Feb 22 '14 at 19:24
  • Agreed, this is on-topic, especially considering it appears that this may really be about reading ACPI information from firmware storage: this information isn't even stored inside what most of us would think of as the Windows system. – Eliah Kagan Feb 22 '14 at 23:31

I found it here. The key seems to be stored in the ACPI-firmware:

sudo strings /sys/firmware/acpi/tables/MSDM

Which gave me the following results:


(I replaced the product key with #)

pipe into | tail -n1 if you need only the key as output.

  • 2
    That may be Lenovo specific to have the key in the firmware. My work computers (Dell Laptop and Compaq Desktop) have a SLIC, but no MSDM. Admittedly, both these computers predate Windows 8 by a few years. – The Dude Feb 20 '14 at 19:56
  • 1
    On newer Dell PCs, that table actually exists. I have found it on two Dell Precision T1700 desktops from june 2014. – Jorge Suárez de Lis Jul 29 '14 at 9:44
  • This worked great on a Lenovo Yoga3. – seanbreeden Sep 19 '16 at 19:36
  • Worked on my UEFI Acer Aspire V. So it applies to other UEFI systems. – Torrien Mar 17 '18 at 17:58

If your HD is broken and need to install on a new HD or just want to know the key without an HD, this may help you:

sudo acpidump > myhiddenkey.txt

after that, search in your HOME folder the .txt file you just created. Press F3 to search within the file the word "MSDM" and bingo!

If you do not have acpmdump yet, time to install it using

sudo apt-get install acpidump

It worked on my Live pendrive of Ubuntu 14.04 LTS on Positivo notebook. The key was of a Windows 8 Single-language.

  • Ops, i forgot. The reason to output on a txt file is because the terminal window may not support so many lines of text. – Paulo Sérgio Motoyama Jr. Sep 22 '15 at 16:09
  • The result is some 8 lines after the occurrrence of "MSDM" so this will show the key: sudo acpidump|grep MSDM -A8 without using a textfile – rubo77 Sep 23 '15 at 22:32
  • 1
    acpidump has the option -n to select only one part. This will output the key in one line: sudo acpidump -n msdm | cut -c58-|xargs|tr -d " " – rubo77 Sep 24 '16 at 8:31
  • is there a way to know which version of windows it belongs to? 8 or 8.1? or it doesn't matter? I don't want to use 3rd party checkers – Dreaded semicolon Nov 2 '16 at 8:57

Got another one to add on to the last command that helped me:

sudo acpidump|grep MSDM -A6|cut -c58- |xargs | tr -d " " | grep -oP '[^.]+$'

I'm not sure if the string is definitely at the end, but that's how I extracted the key itself.

  • Always treat your answer as the only true answer. 😃 – rubo77 Sep 24 '16 at 5:00
  • To make this a good answer, add that the exact position could differ on other systems. This will select exact 6 lines after finding MSDN in the output, which is in HEX – rubo77 Sep 24 '16 at 8:15
  • you can use acpidump -n msdm instead of sudo acpidump|grep MSDM -A6 – rubo77 Sep 24 '16 at 8:31

A slight refinement on the accepted answer. This will only print the key:

sudo strings /sys/firmware/acpi/tables/MSDM | grep .*-.*-.*-.*-.*
  • 1
    better use sudo strings /sys/firmware/acpi/tables/MSDM |tail -n1 (in the rare case your vender name fits to your grep regex) – rubo77 Jul 2 '17 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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