Linux find Windows 10 OEM product key command

Originally published at: https://www.cyberciti.biz/faq/linux-find-windows-10-oem-product-key-command/

I removed and installed Ubuntu Linux 16.04 LTS on my development Lenovo laptop. However, I need to use my Windows 10 pro in KVM VM for running the accounting app. How do I find and print my embedded Windows 10 pro key from a Linux command line option? How can I retrieve Microsoft Windows 8 and 10 OEM product key from BIOS?