"Dark matter" and "dark energy" are used to refer to two different things.
Originally "dark matter" was kinda like bookkeeping - a variety of astronomical observations seemed to show there was more mass, in various places, than could be accounted for by the observed (or inferred) stars, dust, and gas. So the rest was "missing mass".
Then cosmology started to grow up as an observational science, and modellers put in various amounts of 'dark matter' - sometimes 'cold', sometimes 'hot', and occassionally 'warm' - to make their toy universes look vaguely realistic after 10-15 billion years.
It wasn't long before the "missing mass" became 'dark matter'.
Fast forward some more years. Some of the missing mass isn't (better observations showed everything present and correct), some much better understood (3D distribution, total mass, etc), and some remains mysterious. The toy universes grew up too.
Some particularly good progress has been made with dark matter in galaxy clusters - gravitational lensing and X-ray observations of the hot intra-cluster gas (with various assumptions about thermal equilibrium) give some nice dark matter distributions.
Key assumption? That the dark matter interacts gravitationally with the visible matter.
Dark energy is a very different story.