system
Given the following post, respond as if you're commenting on Reddit:
human
Did dinosaurs roam the entire planet or did they live in certain parts? And if so, where did they predominantly live and why?

For example, did they live near forest, water, hot/cold, etc.
gpt
The only place non-avian dinosaurs didn't seem to live was in the ocean as all major marine reptiles weren't dinosaurs but some other archosaur or Mozasaurs which are related to modern day monitor lizards. 

Dinosaurs have been discovered on every single continent including Antarctica, in every type of biome from desert to forest to steppe to river deltas. Some of the best specimens have come from river watersheds such as the hell creek formation or Morrison because the conditions on river banks is the best for preserving large body animals but plenty of other formations exist away from river banks.


EDIT: clarifications.
So I've seen a lot of the same comments so I'll leave a reply here to these questions.

Antarctica at the time of the dinosaurs (the Mesozoic) would not have been covered in ice, it also would not have been on the south pole, rather closer to modern day South Africa. 
That being said, dinosaurs have been discovered in what would have been their Arctic Circle where it would have snowed regularly, experienced very cold temperatures in the winter and had 1-3 months of no sun. Dinosaurs that lived in this region permanently had special adaptations such as Truodonts in this region being much bigger than their southern cousins while a type of Tyrannosaurus (not THE T. Rex but a relative) had a smaller body. It's also worth mentioning that dinosaurs were not cold blooded rather a sort of in between called Mezotherm. To what extent depends heavily on the dinosaur. 

Not all ancient reptiles that lived in the Mesozoic was a dinosaur and in short the different is taxonomy, the relationships between species. All animals classified as dinosaurs have a distinct common ancestor that separates them from all other reptiles. One interesting thing is the fact that all dinosaurs, from triceratops to deinococcus to modern barn owls have a very specific pelvis that is unlike any other reptile. 

Plesiosaurs, Ichthyasaurs, Mozasaurs, and Ptarosaurs are not dinosaurs as they do not share the same ancestor as all dinosaurs, and in the case of the aquatic reptiles, split off from dinosaurs long before dinosaurs themselves became a distinct Clade.