  Measurements are presented of the lifetimes of the B$^0$, B$^0_\mathrm{s}$,
$\Lambda^0_\mathrm{b}$, and B$_\mathrm{c}^+$ hadrons using the decay channels
B$^0\to$ J/$\psi$K*(892)$^0$, B$^0\to$J/$\psi$K$^0_\mathrm{S}$,
B$^0_\mathrm{s}\to$J/$\psi \pi^+\pi^-$, B$^0_\mathrm{s}\to$J/$\psi\phi$(1020),
$\Lambda^0_\mathrm{b}\to$J/$\psi\Lambda^0$, and B$_\mathrm{c}\to$J/$\psi\pi^+$.
The data sample, corresponding to an integrated luminosity of 19.7 fb$^{-1}$,
was collected by the CMS detector at the LHC in proton-proton collisions at
$\sqrt{s}=$ 8 TeV. The B$^0$ lifetime is measured to be 453.0 $\pm$ 1.6 (stat)
$\pm$ 1.8 (syst) $\mu$m in J/$\psi$K*(892)$^0$ and 457.8 $\pm$ 2.7 (stat) $\pm$
2.8 (syst) $\mu$m in J/$\psi$K$^0_\mathrm{S}$, which results in a combined
measurement of $c\tau_{\mathrm{B}^0} =$ 454.1 $\pm$ 1.4 (stat) $\pm$ 1.7 (syst)
$\mu$m. The effective lifetime of the B$^0_\mathrm{s}$ meson is measured in two
decay modes, with contributions from different amounts of the heavy and light
eigenstates. This results in two different measured lifetimes:
$c\tau_{\mathrm{B}^0_\mathrm{s} \to \mathrm{J}/\psi \pi^+\pi^-} =$ 502.7 $\pm$
10.2 (stat) $\pm$ 3.4 (syst) $\mu$m and $c\tau_{\mathrm{B}^0_\mathrm{s} \to
\mathrm{J}/\psi\phi(1020)} =$ 443.9 $\pm$ 2.0 (stat) $\pm$ 1.5 (syst) $\mu$m.
The $\Lambda^0_\mathrm{b}$ lifetime is found to be 443.9 $\pm$ 8.2 (stat) $\pm$
2.8 (syst) $\mu$m. The precision from each of these channels is as good as or
better than previous measurements. The B$_\mathrm{c}^+$ lifetime, measured with
respect to the B$^+$ to reduce the systematic uncertainty, is 162.3 $\pm$ 7.8
(stat) $\pm$ 4.2 (syst) $\pm$ 0.1 $(\tau_{\mathrm{B}^+})$ $\mu$m. All results
are in agreement with current world-average values.
