We study the Brownian motion of a classical particle in one-dimensional inh
omogeneous environments where the transition probabilities follow quasiperi
odic or aperiodic distributions. Exploiting an exact correspondence with th
e transverse-field Ising model with inhomogeneous couplings, we obtain many
analytical results for the random walk problem. In the absence of global b
ias the qualitative behavior of the diffusive motion of the particle and th
e corresponding persistence probability strongly depend on the fluctuation
properties of the environment. In environments with bounded fluctuations th
e particle shows normal diffusive motion and the diffusion constant is simp
ly related to the persistence probability. On the other hand, in a medium w
ith unbounded fluctuations the diffusion is ultraslow and the displacement
of the particle grows on logarithmic time scales. For the borderline situat
ion with marginal fluctuations both the diffusion exponent and the persiste
nce exponent are continuously varying functions of the aperiodicity. Extens
ions of the results to disordered media and to higher dimensions are also d
iscussed.