Linear shear flows, forces, and heat transfer across a single and two tandem square cylinders are numerically investigated at Reynolds numbers Re = 70–150 and a Prandtl number Pr = 0.71, with the dimensionless inlet shear rate K = 0–0.2. For the two tandem cylinders, the scaled cylinder-gap spacing (S*) is varied from 1.0 to 5.0. The flow is assumed laminar and two-dimensional. The numerical method is based on a finite-volume technique. The effects of K, Re, and S* are investigated on the heat transfer topology, flow structures, and aerodynamic parameters including vortex shedding frequency, pressure coefficient, lift and drag forces, and Nusselt number. For the single cylinder, when K ≠ 0, the time-mean lift force is negative for Re = 70 and 100 but positive for Re = 150. The lift magnitude linearly increases with K. For tandem cylinders, employing three initial conditions for some S* values yields two solutions linked to hysteresis (modes I and II) in the flow, forces, and heat transfer. Hysteresis is observed for S* = 2.0–5.0 when K = 0.2 and Re = 150. Mode I turns in a smaller time- and surface-averaged Nusselt number than mode II. In general, the inlet shear has more effect on the flow around the downstream cylinder than that around the upstream cylinder.