Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I detect the model of a computer, like Leveno or Sony?

Is there any program can do this, for both PC & Laptop?

(I just want to load a specific driver when the target model is detected.)

share|improve this question
    
@walOck, are you writing a shell script? A C program? An udev rule? –  andcoz Dec 1 '11 at 11:49
    
@andcoz , yeah , a shell script –  warl0ck Dec 1 '11 at 13:16

1 Answer 1

up vote 8 down vote accepted

On my system, this works:

$ sudo dmidecode --type 1 | grep 'Product Name'
    Product Name: Macmini4,1
share|improve this answer
    
Yeah , that's the right command , actually plus dmidecode -t BIOS | grep Vendor solved my problem .. thanks ! –  warl0ck Dec 1 '11 at 13:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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