Tested in Debian and Ubuntu Only. I guess other distro can use this command!

There is nothing special just a Simple Command:

$ sudo lshw

I recommend you should pipe to the file like this

$ sudo lshw > hw.txt

in case of you have many Hardware in your computers.

Updated!!! we can export in XML and HTML Type I prefered HTML Styles

$ sudo lshw -html > hw.html

$ sudo lshw -xml > hw.xml

Enjoy!