This wikiHow teaches you how to use your iMac as a monitor for a MacBook, as well as how to share files and printers between both computers. Determine the cable you'll need for your iMac. The type of cable you'll need varies by...
Method 2 of 2:
Sharing Files Between Computers
Connect both Macs to the same wireless network. If you don't have a wireless network, you can use an Ethernet cable instead (just connect the cable to an Ethernet port on both computers, and then move to the next step). Here's how to connect both computers to Wi-Fi:[2]
near the top-right corner of the screen, click it, and then select Turn Wi-Fi On.
at the top-right corner of the screen.
Click the
menu on the computer that has something to share. It's at the top-left corner of the screen.[3]
Click System Preferences.

Click Sharing. A list of sharing services will appear.
Set up file sharing. Here's how to allow users of the other computer to access the files on this one:[4]
Open Finder
on the other computer. It'll be the first icon on the Dock, which is usually at the bottom of the screen.
Click the Go menu. It's at the top of the screen.

Click Connect to Server.

Enter the IP address for the other computer. This is the address you found on the other computer's Sharing screen.

Click Connect.
Choose how to connect.
Follow the on-screen instructions to log in. Once you've connected to the other computer, you can access its files.
Set up printer sharing (optional). If you'd like to share the printer from this computer, return to the Sharing settings, click Printer Sharing, and choose a printer. Once shared, you'll be able to print to it from any app on the other computer by selecting the printer (and logging in, if prompted to do so).
Set up other types of sharing (optional). If you want users of the other computer to be able to connect to this one for remote administration or screen sharing, choose one of those options from the list, then follow the same instructions as you did for file and printer sharing.
Update 24 March 2020
ncG1vNJzZmismaXArq3KnmWcp51ktbDDjK2mZpufo7umr9NmmGalkZivsLvKZquoZZGjeqq5wJw%3D