Testing health of laptop hardware
I recently bought a second-hand laptop and I have installed Ubuntu 20.04 LTS on it. Everything appears on the surface to be working fine, but before I switch over to using this laptop as my main computer I wanted to run some tests to see how well the hardware is holding up.
I'm looking for a Linux command-line tool that will go through and test the different hardware and give me some kind of report about how well it's working. If the tool returns a binary working/not working for each component that would be helpful, and I'm sure this kind of tool exists. I'm wondering if it would be possible to go further than that and return some kind of estimation of the wear on each component, eg. I don't know if this information is accessible, but for the storage you could estimate wear by number of GB written. Is there a test that would return some kind of estimation of wear like this for different components?
I tried installing Phoronix Test Suite, but it looks incredibly complex, there's a zillion different options and I don't know where to start with it. So, any advice on either what tool I can use, or how to use PTS for this purpose would be greatly appreciated.
I don't think there is a single tool that can easily do everything you are wanting.
To pull the specs of the hard drive/ssd (eg what it thinks of itself, how much use it has had), you can use S.M.A.R.T - The smartmontools package contains smartctl - so you can use a command like
smartctl -a /dev/devname
Beyond this, you can test the memory using memtest86 or similar and use something like stress/stress-ng to test the CPU.