I have two 27inch Imac that I would like to connect. I would like to use the older one as a second screen. I am having a hard time getting this to work. Can someone help figure out what cables I might need? On the older Imac- there is a display port, firewire, and USB 2 ports. On the new Imac- there are USB ports and thunderbolt ports. Can someone tell me what attachments or cables to buy to make this work?
https://support.apple.com/en-au/HT204592 is your best source of information.
Just double check that you have the correct iMac model. And especially the cables. Thunderbolt and Mini DisplayPort is physically the same cable, but they are different. So once you know for sure which cable you need (based on the info on Apple website) - get the correct cable.
Without knowing your exact iMac model (and year) - it would be impossible to give you exact answer.
To look up the iMac model - you can put your iMac serial number into here https://everymac.com/ultimate-mac-lookup/