The basic shutdown process

To turn off your computer, use the shutdown command built into your operating system rather than straightforward unplugging it or holding the power button. A proper shutdown closes all running programs, saves open files, and lets your system prepare itself for being powered down. Forcing it off can corrupt files and damage your hard drive.

On Windows, click the Start button in the lower left corner, then click the power icon. Select "Shut down" from the menu that appears. On Mac, click the Apple menu in the top left, then select "Shut Down." On Linux, the method varies by desktop environment, but you can usually right-click the desktop or access the power menu through your system settings.

Your computer will close all open programs and display a message when it is safe to turn off the power. This process typically takes 30 seconds to two minutes. Do not unplug the computer or press the power button again during this time.

Key Takeaways

  • Always use your operating system's shutdown command instead of forcing the power off, because improper shutdown can damage files and your hard drive.
  • Windows users click Start, then the power icon, then "Shut down"; Mac users click the Apple menu and select "Shut Down."
  • Wait for your computer to finish shutting down completely before unplugging it or pressing the power button again.
  • If a program freezes and prevents shutdown, use the force quit or task manager to close it, then try shutting down again.
  • Restarting your computer (rather than shutting it down) closes and reopens everything, which often fixes performance problems.

What happens during shutdown

When you initiate shutdown, your operating system sends a signal to all running programs to close themselves. Programs that have unsaved work will prompt you to save before closing. If you click "Don't Save," that work is lost permanently. Take a moment to check for any unsaved documents before confirming shutdown.

After all programs close, your operating system performs cleanup tasks: it writes temporary data to disk, closes connections to networks and external devices, and prepares the hard drive to stop spinning. This is why you should never interrupt a shutdown by unplugging the computer or holding down the power button. Interrupting this process can leave files in an incomplete state, making them unreadable the next time you start up.

Dealing with frozen programs during shutdown

Sometimes a program stops responding and prevents your computer from shutting down. You will see a message saying a program is not responding and asking whether you want to wait or force it to close. Click "Force Close" or "End Task" to close that program without saving its work, then your shutdown will continue.

On Windows, if the shutdown screen hangs, you can open Task Manager by pressing Ctrl+Shift+Esc, find the frozen program in the list, click it, and click "End Task." On Mac, press Command+Option+Esc to open Force Quit, select the frozen program, and click "Force Quit." After closing the frozen program, try shutting down again through the normal method.

Restart versus shutdown

Restarting your computer closes all programs and then when ready powers the system back on, while shutting down closes everything and leaves the computer off. Restart is useful when a program is behaving strangely, your internet connection has dropped, or you have installed updates that require a restart to take effect.

To restart on Windows, click Start, then the power icon, then "Restart." On Mac, click the Apple menu and select "Restart." Restart performs the same safe shutdown process as a full power-off, so it is equally safe to use. Many technical problems resolve themselves after a restart because it clears temporary files from memory and reloads all system components fresh.

Sleep mode and hibernation

Sleep mode puts your computer into a low-power state where the screen turns off and the hard drive stops spinning, but the computer remains powered on and ready to wake when ready when you move the mouse or press a key. Sleep uses very little electricity and is useful if you step away for a few minutes or an hour. Your open programs and files stay in memory, so you return to exactly where you left off.

Hibernation saves everything in memory to your hard drive, then powers off completely. When you turn the computer back on, it restores everything from the hard drive. Hibernation uses almost no power and is useful for laptops you will not use for several days. However, waking from hibernation takes longer than waking from sleep because the computer must read data from the hard drive.

On Windows, you can access sleep and hibernation through Start > Power icon > "Sleep" or "Hibernate." On Mac, sleep is available through Apple menu > Sleep, but hibernation is not a standard option. If you want your computer completely off and not consuming power, use shutdown instead of sleep or hibernation.

Shutting down a laptop safely

Laptops should be shut down using the same method as a desktop computer. Close the lid after shutdown is complete, or leave it open—either way is safe once the computer has fully powered off. Do not close the lid while the computer is still shutting down, because some laptops interpret a closed lid as a signal to enter sleep mode instead of completing the shutdown.

If your laptop is plugged in, you can leave it plugged in after shutdown. If you are packing it away for travel, unplug it after shutdown is complete. Modern laptop batteries do not drain significantly while the computer is off, so leaving it unplugged for a few days or weeks will not harm the battery.

Common mistakes to avoid

Do not hold down the power button to turn off your computer unless it is completely unresponsive. Holding the power button forces an when ready shutdown without the safe cleanup process, which can corrupt files. Use the power button only as a last resort when your computer is frozen and will not respond to any keyboard or mouse input.

Do not unplug the computer while it is running or shutting down. Unplugging removes power suddenly, which is equivalent to holding the power button and carries the same risk of file corruption. If you need to unplug the computer, shut it down first, wait for it to power off completely, then unplug it.

Do not turn off the monitor and assume the computer is off. The monitor is a separate device from the computer itself. Turning off the monitor leaves the computer running and consuming power. Use your operating system's shutdown command to turn off the computer itself.

Frequently Asked Questions

Is it bad to shut down my computer every day?

No. Shutting down your computer daily is normal and safe. Many people shut down at the end of the workday or before bed. Shutting down completely turns off power consumption and gives your system a fresh start the next time you turn it on, which can improve performance.

What if my computer won't shut down?

First, wait a few minutes—shutdown can take longer than expected if a program is saving large files. If nothing changes after five minutes, open Task Manager (Windows: Ctrl+Shift+Esc; Mac: Command+Option+Esc) and close any frozen programs, then try shutting down again. If the computer still will not shut down, hold the power button for 10 seconds to force it off.

Can I unplug my computer if it is in sleep mode?

You can unplug a computer in sleep mode without data loss because sleep mode saves everything to memory, not to disk. However, unplugging will cause the computer to lose power and wake abruptly. It is safer to wake the computer first, shut it down properly, then unplug it.

Do I need to shut down my computer every night?

No. Sleep mode uses very little power and lets you resume work when ready. Shutdown is better if you will not use the computer for several hours or more, or if you want to save electricity. Either choice is safe—use whichever fits your routine.

What does "force quit" do?

Force quit closes a program when ready without saving its work. Use force quit only when a program stops responding and will not close normally. Any unsaved work in that program will be lost, so force quit should be your last resort, not your first choice.