We present far-infrared (50−200 μm) spectroscopic observations of young pre-main-sequence stars taken with Herschel/PACS as part of the DIGIT key project. The sample includes 16 Herbig AeBe and 4 T Tauri sources observed in SED mode covering the entire spectral range. An additional 6 Herbig AeBe and 4 T Tauri systems have been observed in SED mode with a limited spectral coverage. Multiple atomic fine structure and molecular lines are detected at the source position:The most common feature is the [O i] 63 μm line detected in almost all of the sources, followed by OH. In contrast with CO, OH is detected toward both Herbig AeBe groups (flared and non-flared sources). An isothermal LTE slab model fit to the OH lines indicates column densities of 10 13 < N OH < 10 16 cm −2 , emitting radii 15 < r < 100 AU and excitation temperatures 100 < T ex < 400 K. We used the non-LTE code RADEX to verify the LTE assumption. High gas densities (n ≥ 10 10 cm −3 ) are needed to reproduce the observations. The OH emission thus comes from a warm layer in the disk at intermediate stellar distances. Warm H 2 O emission is detected through multiple lines toward the T Tauri systems AS 205, DG Tau, S CrA and RNO 90 and three Herbig AeBe systems HD 104237, HD 142527, HD 163296 (through line stacking). Overall, Herbig AeBe sources have higher OH/H 2 O abundance ratios across the disk than do T Tauri disks, from near-to far-infrared wavelengths. Far-infrared CH + emission is detected toward HD 100546 and HD 97048. The slab model suggests moderate excitation (T ex ∼ 100 K) and compact (r ∼ 60 AU) emission in the case of HD 100546.Off-source [O i] emission is detected toward DG Tau, whose origin is likely the outflow associated with this source. The [C ii] emission is spatially extended in all sources where the line is detected. This suggests that not all [C ii] emission is associated with the disk and that there is a substantial contribution from diffuse material around the young stars. The flux ratios of the atomic fine structure linesare analyzed with PDR models and require high gas density (n 10 5 cm −3 ) and high UV fluxes (G o ∼ 10 3 −10 7 ), consistent with a disk origin for the oxygen lines for most of the sources.