How can I read the Windows 8 licence key with Ubuntu?

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:

MSDMU
LENOVOCB-01   
ACPI
#####-#####-#####-#####-#####

(I replaced the product key with #)

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


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.


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.


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

sudo strings /sys/firmware/acpi/tables/MSDM | grep .*-.*-.*-.*-.*