1

Is there a way of finding out what the make and model of computer is without simply going to the box or looking at the label on the computer if it had one?

For example if my computer was a HP Pavilion 17-f000 Notebook PC series and I wanted to find that out by using a CLI or GUI program.

3

From the command line:

sudo dmidecode -s system-product-name or sudo dmidecode --string system-product-name

Alternatively

sudo dmidecode | grep -A3 '^System Information'

dmidecode provides a description of the computer's hardware information.

The -s --string flag with the DMI string system-product-name, only outputs the make and model of your computer.

| grep pipes the output to grep and the -A3 flag for grep prints 3 lines after a match for System Information.

2
  • @marhki That would work if the period at the end wasn't there. Also you only need four spaces to format code-blocks on stackexchange. – Enkouyami Sep 10 '15 at 4:41
  • The . was a period to end the sentence. I've amended the response for clarity. – marshki Sep 10 '15 at 21:00
1

Using the dmidecode command-line program, one can find the exact model of anything in your PC. Getting the make and model of your computer can be done with the -s, --string flag with the DMI string system-product-name:

sudo dmidecode -s system-product-name
4
  • I tried this command on Debian 7, Ubuntu 14.04, and CentOS 7 without success. I've proposed an alternative answer using dmidecode. – marshki Sep 9 '15 at 1:04
  • @marshki what version of dmidecode are you using? I have v2.12. Also if you run dmidecode -s without any keywords, does it have "system-product-name" listed as valid keywords? – Enkouyami Sep 10 '15 at 4:32
  • v.2.12 on all tested machines. "System-product-name" appears as a valid keyword in each case. – marshki Sep 10 '15 at 21:11
  • @marshki If it does, then the dmidecode -s system-product-name or dmidecode --string system-product-name should work. – Enkouyami Sep 16 '15 at 16:43

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.