6

as object, I would like to know when a computer was built and also last OS installation date

  • for kernel, uname -a might be a good start. ls -l /boot might give a clue about installation date. use dmidecode for hardware. – Archemar Feb 25 '15 at 8:22
  • There are various manufacturing dates that are available. The CPU, RAM, and motherboard being 3 of them. Which are you looking for? A computer though perceived as a single unit is actually a collection of discrete parts that gives the illusion of a cohesive unit. – slm Feb 25 '15 at 14:18
  • you're right sim, but we could be pretty sure that for a computer age we mean something such as Bios firmware Date and not so interested at RAM for 99% of cases – Noomak Feb 25 '15 at 14:47
  • @slm, how do you get those CPU, RAM, motherboard manufactoring dates? – Stéphane Chazelas Feb 25 '15 at 20:50
  • 1
    @StéphaneChazelas - I didn't mean to imply that these dates were accessible. I'd go through tools such as lstopo, lshw, hwinfo, dmidecode, or cpuid. There are other tools that can extract either lowlevel info from the hardware, or can give you a part#/serial# which can be looked up to verify a components actual manuf. date. – slm Feb 25 '15 at 21:41
9

OS installation date is ambiguous: what counts as a new installation? If all the files are new after update, is it still the same installation? The "official" setup script may record the date, but this is distribution dependent and most distros won't do that. However, you can always check the earliest date of the files in /bin/, /etc/ and /boot/, most of them are updated very rarely. uname -a will tell you about the kernel, but a lot of distros update the kernel during their updates, and /boot/ entries with them - is a new kernel a new installation?

For hardware, it's the same problem - which part of hardware do you want to check? Motherboard is probably the best choice: the age of firmware (BIOS/EFI...).

dmidecode will tell you at least about the firmware - BIOS version and date is the closest to what you are asking about. A better formatted and easier to read is lshw which also tells you about the firmware date. Also try hwinfo - it doens't tell dates but could be useful someday. For hard drives, smartctl will tell you a lot - hard drives have self-monitoring capabilities.

  • I've made many updates on this distro, but it seems to me that grub information through ls -l /boot is the correct OS installation date, concerning computer built, Bios Information has it, but as you've said, if I'll upgrade its firmware could be lost by upgrade date – Noomak Feb 25 '15 at 8:45

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