  For a random matrix of entries sampled independently from a fairly general
distribution in Z we study the probability that the cokernel is isomorphic to a
given finite abelian group, or when it is cyclic. This includes the probability
that the linear map between the integer lattices given by the matrix is
surjective. We show that these statistics are asymptotically universal (as the
size of the matrix goes to infinity), given by precise formulas involving zeta
values, and agree with distributions defined by Cohen and Lenstra, even when
the distribution of matrix entries is very distorted. Our method is robust and
works for Laplacians of random digraphs and sparse matrices with the
probability of an entry non-zero only n^{-1+epsilon}.
