Thermal expansion and magnetostriction, the strain responses of a material to temperature and a magnetic field, especially properties at low temperature, are extremely useful to study electronic and phononic properties, phase transitions, quantum criticality, and other interesting phenomena in cryogenic engineering and materials science. However, traditional dilatometers cannot provide magnetic field and ultra-low temperature (<77 K) environment easily. This paper describes the design and test results of thermal expansion and magnetostriction at cryogenic temperature using the strain gauge method based on a Physical Properties Measurements System (PPMS). The interfacing software and automation were developed using LabVIEW. The sample temperature range can be tuned continuously between 1.8 and 400 K. With this PPMS-aided measuring system, we can observe temperature and magnetic field dependence of the linear thermal expansion of different solid materials easily and accurately.