On Debian-derived systems, for hardware information use lshw, hwinfo, udevadm, hdparm, inxi (this one needs installing first) etc. To accurately identify machines you may try to use the system serial number, vendor, model, the MAC address of the network controllers, the serial number of the hard disk etc. (You may only try because some machines are virtual...) There is a tutorial with screen shots at http://www.binarytides.com/linux-commands-hardware-info/ and generally Google is not short of suggestions.
You may want to record hostname, uname -a, lsb-release -cdr and /etc/machine-id. Also df may come in handy.
For installed packages use dpkg-query, for example,
dpkg-query --list | grep '^ii' | awk '{print $2 " " $3 " ("$4")"}
produces a list beginning with
a11y-profile-manager-indicator 0.1.10-0ubuntu3 (amd64)
account-plugin-facebook 0.12+16.04.20160126-0ubuntu1 (all)
account-plugin-flickr 0.12+16.04.20160126-0ubuntu1 (all)
account-plugin-google 0.12+16.04.20160126-0ubuntu1 (all)
accountsservice 0.6.40-2ubuntu11.3 (amd64)
acl 2.2.52-3 (amd64)
... etc. etc. ...
Other Linux variants have their own mechanisms to collect system information, for example Red Hat Enterprise Linux has sosreport.
Most if not all proprietary UNIX systems have dedicated tools to collect system information, including hardware configuration and installed software. For example, HP-UX has a nice /opt/ignite/bin/print_manifest command.