Measure how far from the wall you want the row of can lights to be. Mark this distance in two locations on the ceiling. Aim a laser level at the ceiling and adjust it so the laser lines up with the marks you made.
Run a stud finder over the laser line to locate the ceiling joists. Make small X marks along the line to indicate the central placement of each recessed light. Space them evenly apart and between the ceiling joists.
Attach a hole saw to a drill. Center the hole saw over the first X mark along the laser line. Drill through the drywall ceiling and into the attic. Repeat with each X mark.
Take the recessed lights up to the attic. Place one light between the first two ceiling joists that have a hole drilled between them. Pull on the recessed light's side arms until each of the tabs are pressed against the ceiling joists.
Hammer 1-inch nails through the holes in each arms' tabs to secure the light in place. Hold the light's can portion with two hands. Carefully slide it to either the right or left to center it over the hole.
Repeat Steps 4 and 5 for each of the remaining holes.