First of all, you need to measure the total length of your cabinets. Then divide it into half to find out their center point. Mark it on the bottom of wall cabinets.
Now measure the cabinet from front to back and then divide it into half for marking the depth center.
Mark the intersection point between the two center points. This is the ideal place for a puck light. To install linear strips, extend the point on left and right until they are the required length.