The fastest keyboard shortcut to shut down your computer

On Windows, press Alt + F4 while you are on the desktop (not inside an open program). A shutdown dialog box will appear with three options: Switch User, Sign Out, Shut Down, and Restart. Use the arrow keys to highlight "Shut Down" and press Enter. Your computer will begin shutting down when ready.

If Alt + F4 does not work, your computer may have a program window active instead of showing the desktop. Close all open windows first, then try again. Alternatively, use the Windows key + X method described in the next section, which works more reliably on newer Windows versions.

On Mac, press Control + Command + Power (or Control + Command + Eject on older keyboards). A dialog will ask you to confirm. Press Enter or click "Shut Down". This method forces shutdown without saving unsaved work, so save your files first.

Key Takeaways

  • Windows users can press Alt + F4 on the desktop, then use arrow keys to select Shut Down and press Enter.
  • Windows 10 and 11 users can press Windows key + X, then press U twice to shut down without a dialog.
  • Mac users press Control + Command + Power, then press Enter to confirm shutdown.
  • Always save your work before using keyboard shutdown methods, as they do not prompt you to save open files.
  • If a program is frozen and blocking shutdown, use Task Manager (Windows) or Force Quit (Mac) to close it first.

Windows shutdown using the power menu

The Windows key + X shortcut opens a menu called the Power User menu. Press the Windows key (the key with the Windows logo) and X at the same time. A black menu will appear on the left side of your screen with options including Shut Down or Sign Out.

Once the menu is open, press U to highlight the Shut Down option, then press U again to confirm. Your computer will shut down without showing a dialog box. This method is faster than Alt + F4 and works on Windows 10 and Windows 11.

If you want to restart instead of shut down, press Windows key + X, then press U once (to highlight Shut Down), then press the right arrow key to reveal the submenu, and press R for Restart.

Shutting down from inside a program or window

If you have a program open and want to shut down without closing it manually, press Alt + F4. This will close the active window. If more windows are open behind it, Alt + F4 will close them one at a time. Keep pressing Alt + F4 until you reach the desktop, then use the method above to shut down.

Alternatively, use Windows key + X from anywhere on your screen—it works even if a program window is active. The Power User menu will still appear, and you can proceed to shut down from there.

On Mac, if a program is open, press Command + Q to quit that program, then use Control + Command + Power to shut down the computer. If a program is frozen and will not quit, press Command + Option + Escape to open Force Quit, select the frozen program, click Force Quit, and then shut down.

What to do if your keyboard shortcut is not working

If Alt + F4 or Windows key + X does not respond, a program may be running in full-screen mode or your keyboard may not be responding. Try pressing the Escape key first to exit full-screen mode, then try the shortcut again.

If the keyboard still does not work, restart your computer by holding the power button on your computer case for 10 seconds until it turns off completely. Wait 30 seconds, then press the power button once to turn it back on. This is a hard shutdown and should only be used when keyboard shortcuts fail.

On Mac, if Control + Command + Power does not work, hold the power button on your Mac for 10 seconds until the screen goes black. Wait a few seconds and press the power button again to restart.

Scheduling a shutdown for a specific time

Windows does not have a built-in keyboard shortcut to schedule a shutdown at a future time, but you can use the Command Prompt to do this. Press Windows key + R, type cmd, and press Enter. In the Command Prompt window, type the following command: shutdown /s /t 3600 (where 3600 is the number of seconds to wait—3600 seconds equals one hour). Press Enter. Your computer will shut down after that time has passed.

To cancel a scheduled shutdown before it happens, press Windows key + R, type cmd, and press Enter. Type shutdown /a and press Enter. The shutdown will be cancelled.

Mac does not have a straightforward keyboard method to schedule shutdown, but you can use the Terminal app. Press Command + Space, type Terminal, and press Enter. Type sudo shutdown -h +60 (where 60 is the number of minutes to wait), press Enter, and enter your password when prompted.

Restarting instead of shutting down

If you want to restart your computer instead of shutting it down completely, the keyboard shortcuts are similar. On Windows, press Alt + F4 on the desktop, use the arrow keys to select "Restart", and press Enter. Alternatively, press Windows key + X, then press U once, then press the right arrow key, then press R.

On Mac, press Control + Command + Power, and when the dialog appears, press the right arrow key to select "Restart" instead of "Shut Down", then press Enter.

Frequently Asked Questions

Will Alt + F4 save my work before shutting down?

No. Alt + F4 shuts down your computer without prompting you to save. If you have unsaved files open, they will be lost. Always save your work manually before using any keyboard shutdown method.

What is the difference between shutdown and restart?

Shutdown turns your computer completely off. Restart turns it off and then when ready turns it back on. Restart is useful when a program is frozen or your computer is running slowly. Shutdown is used when you are done working for the day.

Can I undo a shutdown after I have started it?

On Windows, if you used the Command Prompt to schedule a shutdown, you can cancel it by typing shutdown /a in Command Prompt before the timer runs out. If you used Alt + F4 or Windows key + X, the shutdown begins when ready and cannot be stopped without holding the power button.

Why does my keyboard shortcut not work on my laptop?

Some laptops require you to hold the Fn key along with Alt and F4. Try pressing Fn + Alt + F4. If that does not work, your keyboard may have a different configuration. Check your laptop's manual or use the Windows key + X method instead, which is more reliable on most laptops.

Is it safe to shut down using the keyboard every time?

Keyboard shutdown is safe as long as you have saved your work first. It is faster than using the mouse, but it does not give you a chance to save unsaved files. For regular shutdown, keyboard shortcuts are fine. For a hard shutdown (holding the power button), only use it when your computer is frozen and will not respond to keyboard or mouse input.