How to check the health of a hard drive in linux

Example Ubuntu