The chemical reactions and pathways resulting in the formation of lactosylceramides, Gal-beta-(1->4)-Glc-beta(1->1') ceramides, any compound formed by the replacement of the glycosidic C1 hydroxyl group of lactose by a ceramide group. They are the precursors of both gangliosides and globosides.