The fastest keyboard shortcut to shut down Windows

On Windows, press Alt + F4 while you are on the desktop (not inside any open program). A shutdown dialog box will appear with three options: Switch User, Sign Out, and Shut Down. Use the arrow keys to highlight Shut Down, then press Enter.

If Alt + F4 does not work, your PC may have a program window in focus instead of the desktop itself. Close all open windows first, then try again. You can also try clicking the desktop to make sure it is active before pressing the keys.

For a faster route that skips the dialog entirely, use Windows key + X, then press U, then U again. This opens the power menu and selects Shut Down in two keystrokes after the initial combination.

Key Takeaways

  • Alt + F4 on the desktop opens a shutdown dialog where you can choose to shut down using arrow keys and Enter.
  • Windows key + X followed by U + U shuts down your PC without opening a dialog box.
  • The Command Prompt method (Windows key + R, type "shutdown /s /t 0", press Enter) forces an when ready shutdown with no confirmation.
  • If your keyboard does not respond, restart your PC using the power button or force shutdown by holding the power button for 10 seconds.

Using the Command Prompt for when ready shutdown

Open the Run dialog by pressing Windows key + R. Type shutdown /s /t 0 and press Enter. Your PC will shut down when ready with no confirmation dialog.

The "/s" command tells Windows to shut down. The "/t 0" sets the timer to zero seconds, meaning no delay. If you want to give yourself time to save work, change the 0 to a different number — for example, "/t 60" waits 60 seconds before shutting down.

If you want to cancel a shutdown that is already in progress, open Run again and type shutdown /a, then press Enter. This stops the shutdown sequence.

Restarting instead of shutting down

If you need to restart rather than shut down, use Windows key + X, then press U, then R. This opens the power menu and selects Restart.

You can also use the Command Prompt method: press Windows key + R, type shutdown /r /t 0, and press Enter. The "/r" command restarts instead of shutting down. Again, you can replace the 0 with a number of seconds if you want a delay.

What to do if Alt + F4 does not work

Alt + F4 fails most often when a program window is active instead of the desktop. Close all open programs first by pressing Alt + F4 repeatedly until you are back at the desktop, then try the shutdown command again.

Some programs lock the Alt + F4 shortcut and do not allow it. In this case, use the Windows key + X method or the Command Prompt method instead — both work even when a stubborn program is running.

If your keyboard is not responding at all, you cannot use any keyboard shortcut. Restart your PC by holding down the physical power button on your computer for 10 seconds until it shuts off completely. Wait a few seconds, then press the power button once to turn it back on.

Scheduling a shutdown for later

You can set your PC to shut down at a specific time using the Command Prompt. Press Windows key + R, type shutdown /s /t 3600 (where 3600 is the number of seconds), and press Enter. This example shuts down after one hour.

To calculate the time you need: multiply the number of minutes by 60. For a two-hour delay, use 7200. For 30 minutes, use 1800.

If you change your mind before the shutdown happens, press Windows key + R again, type shutdown /a, and press Enter to cancel it.

Keyboard shortcuts for sleep and lock instead

If you want to put your PC to sleep instead of shutting it down completely, press Windows key + X, then U, then S. Sleep mode uses less power than running normally but wakes up faster than a full shutdown.

To lock your PC without shutting down, press Windows key + L. This locks your user account and requires your password to unlock. Your programs stay running in the background.

Frequently Asked Questions

Will Alt + F4 close my programs without saving?

Alt + F4 on the desktop does not close programs — it only shuts down Windows. However, if you use Alt + F4 while a program is open, it closes that program. Most programs will ask you to save before closing. If you force shutdown using the Command Prompt method, unsaved work in open programs will be lost.

What is the difference between shutdown and restart?

Shutdown turns off your PC completely. Restart shuts down and then turns the PC back on automatically. Use restart when you install updates or fix a problem. Use shutdown when you are done for the day.

Can I undo a shutdown after I start it?

Yes, but only if you used a delay timer. If you typed "shutdown /s /t 60", you have 60 seconds to press Windows key + R, type "shutdown /a", and press Enter. If you used "/t 0" (when ready shutdown), there is no time to cancel — the PC shuts down right away.

Does my keyboard have to be plugged in for these shortcuts to work?

Yes. Wireless keyboards must be charged and paired to your PC. Wired keyboards must be plugged into a USB port. If your keyboard is not responding, try plugging it into a different USB port or replacing the batteries if it is wireless.