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.

On Mac, press Control + Command + Power (or Control + Command + Eject on older keyboards). This shuts down when ready without a confirmation dialog. If you want a confirmation first, use Command + Q to close all open programs, then go to the Apple menu and select Shut Down.

On Linux, the command varies by desktop environment. In most distributions, press Alt + F2, type shutdown -h now, and press Enter. Some systems respond to Ctrl + Alt + Delete followed by arrow keys to select shutdown.

Key Takeaways

  • Windows users can press Alt + F4 on the desktop to open the shutdown menu, then use arrow keys and Enter to shut down.
  • Mac users can press Control + Command + Power for an when ready shutdown, or Control + Command + Eject on older keyboards.
  • Linux shutdown speed depends on your desktop environment, but Alt + F2 followed by typing the shutdown command works on most systems.
  • If a program is frozen and blocking Alt + F4, use Task Manager (Windows), Force Quit (Mac), or the terminal (Linux) to close it first.

Windows shutdown using the Run dialog

Press Windows key + R to open the Run dialog box. Type shutdown /s /t 0 and press Enter. The /s command shuts down, and /t 0 means shut down when ready with no delay. If you want a 30-second countdown instead, type shutdown /s /t 30.

You can also use shutdown /h to put the computer into hibernation, or shutdown /r /t 0 to restart instead of shut down. The Run dialog method is useful if Alt + F4 is not responding or if you want to schedule a shutdown for a specific time.

Mac shutdown without a confirmation dialog

On Mac, Control + Command + Power shuts down when ready. There is no confirmation, so the computer will close all programs and power off right away. If you have unsaved work, it will be lost.

If you want a confirmation dialog first, hold down the Power button for a few seconds instead. This opens a menu where you can choose Shut Down, Restart, or Sleep. You can also navigate this menu using arrow keys and press Enter to confirm.

What to do if a frozen program is blocking shutdown

On Windows, press Ctrl + Shift + Esc to open Task Manager directly. Find the frozen program in the list, click it, and click "End Task" at the bottom right. Once the program closes, you can use Alt + F4 or the Run dialog to shut down normally.

On Mac, press Command + Option + Esc to open Force Quit Applications. Select the frozen program and click "Force Quit". On Linux, open a terminal with Ctrl + Alt + T, type killall [program name], and press Enter to close the frozen program.

Scheduling a shutdown for a specific time

On Windows, open the Run dialog with Windows key + R, then type shutdown /s /t 3600 where 3600 is the number of seconds until shutdown (3600 seconds = 1 hour). You can change this number to any value you want. To cancel a scheduled shutdown, press Windows key + R again and type shutdown /a.

On Mac, open Terminal (Command + Space, type "Terminal", press Enter), then type sudo shutdown -h +60 where 60 is the number of minutes until shutdown. Press Enter and type your password when prompted. To cancel, type sudo shutdown -c in the same terminal window.

Restarting instead of shutting down

On Windows, use Alt + F4 on the desktop and select "Restart" from the dialog, or type shutdown /r /t 0 in the Run dialog. On Mac, hold the Power button until the shutdown menu appears, then select "Restart". On Linux, type shutdown -r now in the terminal.

Restarting is useful when a program is not responding or when you have installed updates that require a restart to take effect. The keyboard shortcuts are the same as shutdown, except you select or type the restart command instead.

Frequently Asked Questions

Will Alt + F4 close my programs before shutting down?

No. Alt + F4 opens the shutdown menu, but it does not save your work. Windows will attempt to close programs, but unsaved documents will be lost. Save all your work before using Alt + F4 to shut down.

What is the difference between shutdown and restart?

Shutdown powers off the computer completely. Restart shuts down and then powers back on automatically. Use restart when you have installed updates or when a program is frozen and needs the system to reload.

Can I undo a shutdown after I have started it?

On Windows, yes — if you used the Run dialog with a delay (like /t 30), you can press Windows key + R and type shutdown /a to cancel. If you used /t 0 (when ready shutdown), you cannot undo it. On Mac and Linux, when ready shutdown cannot be undone once the process starts.

Why is my computer not responding to keyboard shutdown commands?

A frozen program may be blocking input. Try opening Task Manager (Ctrl + Shift + Esc on Windows) or Force Quit (Command + Option + Esc on Mac) to close the frozen program first. If the entire system is unresponsive, hold the physical power button for 10 seconds to force a shutdown.