How to keep your screen on when your laptop is closed – Business Insider

Most people want their laptop to go to sleep when the lid is closed, and so that’s how both Windows and the MacOS are designed to work. But if your laptop is connected to an external display, then you probably want the screen to stay on when the laptop is closed. The good news: Even though that’s not the default, you can tell your computer to remain on when it’s in a closed position. 
1. In the Start search box, type « Control » and click Control Panel when you see it appear in the search results. 
2. In the Control Panel’s search box, type « power » and then click Power Options when you see it appear. 
3. In the navigation pane on the left, click Choose what closing the lid does.
4. In the Power and sleep buttons and lid settings, find When I close the lid. There are two settings here: while on battery and plugged in. Set either or both of those to Do nothing
5. Click Save changes.
6. If it isn’t already, connect the laptop to an external monitor and close the lid.
Quick tip: Most of the time, you’ll want to set On battery to Sleep and Plugged in to Do nothing, because you’ll probably have your laptop plugged into power if it’s connected to an external display.
1. Click the Apple icon at the top left and then choose System Preferences…
2. Click Battery.
3. Click the Power Adapter tab on the left side of the window and then, in the Turn display off after section, drag the slider to the right to Never
4. Click the checkbox for Prevent computer from sleeping automatically when the display is off
5. Make sure your Mac is plugged into power and connect it to an external display.

source