The problem of Dubins on a Riemannian manifold consists in finding a curve of minimal length which has bounded first curvature and satisfies some arbitrarily given first order conditions on its initial and terminal points. We study Dubins' problem on two-dimensional homogeneous spaces of constant curvature. In the Euclidean case it is known that optimal curves are necessarily concatenations of arcs of circles C and line segments L.Such concatenations are of at most three pieces, and they follow what we have called the pattern of Dubins, that is, they appear as CCC or CLC. We prove that Dubins' pattern appears also in non-Euclidean cases, with Cdenoting a constant curvature arc and L a geodesic. In the Euclidean case we provide a new proof for the nonoptimality of concatenations of four arcs of circles. We derive our results by applying the maximum principle to a time optimal control system determined on the connected component of the identity of the isometry group of the base manifold.