The iMac, one of the best all-in-one equipment from my point of view, with a exquisite design and the ability to have the two most popular operating systems 'legally' in one place, makes it a more than good work or multimedia option. The negative point is that there are many users who have always blamed this equipment that it cannot be used as an external monitor from the version that began to integrate the Thunderbolt connection and they are partly right.
However, it is not all that bad since in certain aspects we can use the iMac as external monitor if only in the case of using another Mac and effectively through the same Thunderbolt connection.
As in target disk mode, in which the Mac's built-in disks can be mounted as external drives via FireWire or Thunderbolt To another system, Target Display mode allows an iMac to be used as an external monitor with a second Mac to expand the desktop or clone the one we already have. Unlike the 'target disk' mode, this Target Display mode it does not require that the Mac be restarted to achieve this, but on the contrary it can be 'invoked' within the system itself.
In this way, the first thing we will do is check what type of iMac we have and the date of its manufacture, perhaps the easiest thing is to check whate has a Thunderbolt connection on the back but it is preferable to make sure, for this we will go to the menu > About this Mac.
Note that on most Macs, the function keys are assigned to a system function by default , so either you have to revert this in the keyboard system preferences or simply by holding down the "Fn" key in addition to the CMD key before pressing F2. By doing this the system will remain operational but the screen will now be accessible through the Thunderbolt connection of the iMac.
The only thing that we will need before all these steps is to have the two Macs correctly connected through a Thunderbolt cable or Thunderbolt adapters as shown in the image of this post.