If you’re downloading a large file, or just want to keep a program running while you go somewhere, or sleep, you don’t want your computer going into its sleep mode, because that would stop it from continuing. Fortunately its quick and easy to make it so your computer will not automatically sleep on both Windows and Mac OS.
Start out by clicking the Start button and clicking Control Panel (screenshot not available)
Click on System and Security
Then click on Power Options
After that, click on “Change Plan Settings” next to your current plan
Click “Change advanced power settings”
Click the plus by “Sleep” and then “Sleep After”, and click on it. Type 0, or go down until it says Never, and it won’t go into automatic sleep after a certain time.
Now if you want it to not go to sleep when you close the lid, click the plus next to “Power Buttons and Lid”, and then “Lid Close Action”, and click the options and set it to “Do Nothing”
Start out by opening System Preferences
Click on “Energy Saver” under the “Hardware” section
Slide the Computer Sleep slider to “Never”, and it will never fall asleep while the lid is open. Click on the Power Adapter tab and do the same thing if you do not want the computer to fall asleep while it is being charged.
It will ask you to confim your decision, click OK and you’re done.