  We derive an exact solution of the spherically symmetric Bardeen black hole
surrounded by perfect fluid dark matter (PFDM). By treating the magnetic charge
$g$ and dark matter parameter $\alpha$ as thermodynamic variables, we find that
the thermodynamic first law and the corresponding Smarr formula are satisfied.
The thermodynamic stability of the black hole is also studied. The result show
that, there exists a critical radius $r_{+}^{C}$, where the heat capacity
diverges, suggesting that the black hole is thermodynamically stable in the
range $0<r_{+}<r_{+}^{C}$. In addition, the critical radius $r_{+}^{C}$
increases with the magnetic charge $g$ and decreases with the dark matter
parameter $\alpha$. Applying the Newman-Janis algorithm, we generalize the
spherically symmetric solution to the corresponding rotating black hole. With
the metric at hand, the horizons and ergospheres are studied. It turns out that
for a fixed dark matter parameter $\alpha$, in a certain range, with the
increase of the rotation parameter $a$ and magnetic charge $g$, the Cauchy
horizon radius increases while the event horizon radius decreases. Finally, we
investigate the energy extraction by the Penrose process in rotating Bardeen
black hole surrounded by PFDM.
