We extend the work of Kurchan on the Gallavotti–Cohen fluctuation theorem, which yields a symmetry property of the large deviation function, to general Markov processes. These include jump processes describing the evolution of stochastic lattice gases driven in the bulk or through particle reservoirs, general diffusive processes in physical and/or velocity space, as well as Hamiltonian systems with stochastic boundary conditions. For dynamics satisfying local detailed balance we establish a link between the average of the action functional in the fluctuation theorem and the macroscopic entropy production. This gives, in the linear regime, an alternative derivation of the Green–Kubo formula and the Onsager reciprocity relations. In the nonlinear regime consequences of the new symmetry are harder to come by and the large deviation functional difficult to compute. For the asymmetric simple exclusion process the latter is determined explicitly using the Bethe ansatz in the limit of large N.