Set units to millimeters.
G21 is a G-code used to set the units of measurement to millimeters. It is used to specify that all coordinates in the G-code program are to be interpreted as millimeters. This is typically used in CNC machines that are used in countries that use the metric system of measurement.
G20 is the counterpart of G21 command, it is used to set the units of measurement to inches. This is typically used in CNC machines that are used in the United States and other countries that use the imperial system of measurement.
For example, if a G-code program starts with G21 all the following coordinates will be in millimeters, while if it starts with G20 all the coordinates will be in inches.
G20
G21