How all Pixar movies are linked
Yes, all of the Pixar movies are linked, starting with “Brave” (in the 14th and 15th century) and moving forward to “Monsters Inc” (in the year 5000).
Everything looks pretty normal on Earth until 2100, when the “Cars” universe take place.
When animals rose up against the humans to stop the pollution, the machines saved the humans and they won the war. However since machines helped humans win, it tipped the balance on Earth. Machines/BnL had to send the remaining humans off into space on a ship called Axiom. All of the other machines were left behind to populate the world and run things.
PixarTheory has the full story*, or just click the pic below for a base overview.
* The whole thing is worth looking at, even if only because it includes the phrase: “Wall-E is a robot Jesus”