Interacting classical particles diffusing in 1d have provided in recent years an interesting playground to study non-equilibrium phenomena. The dynamics of some of these models is described by an evolution operator, which can be written as a spin chain Hamiltonian H. One is interested in the steady state and in the probability that the system presents an atypical current flow. These are described by large deviation functions (ldf). Finding the ldf amounts to determining the ground state of H - a task similar to the quantum problems. I will present different methods (Bethe Ansatz, fluctuating hydrodynamics) used to compute the ldf and to characterize its singularities -- which correspond to dynamical phase transitions. Some class of systems also present an intriguing duality between non-equilibrium and equilibrium, that reveal for instance the origin of long-range correlations induced e.g. by contact with reservoirs of different chemical potential.