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. Press the down arrow key once to highlight "Shut down," then press Enter. Your computer will close all programs and power off.
On Mac, press Command + Q to close the active program, then press Command + Control + Eject (or Command + Control + Power button on newer Macs). A dialog will ask if you want to restart or shut down. Press Tab to move to "Shut Down," then press Enter.
On Linux, the method depends on your desktop environment. In most distributions, press Alt + F2, type shutdown -h now, and press Enter. Some systems use Super (Windows key) + S to open a power menu instead.
Key Takeaways
- Windows users can shut down with Alt + F4 on the desktop, then arrow down to Shut Down and press Enter.
- Mac users press Command + Control + Eject, then Tab to Shut Down and press Enter.
- If a program is frozen and blocking shutdown, force-close it first with Alt + F4 (Windows) or Command + Q (Mac).
- You can also use the Windows Start menu with Alt + Tab and arrow keys if the keyboard shortcut does not work.
- Linux shutdown varies by desktop, but Alt + F2 followed by typing the shutdown command works on most systems.
What to do if Alt + F4 does not work on Windows
If Alt + F4 does nothing, a program may be blocking the command. Click the taskbar or press the Windows key to make sure you are on the desktop, not inside a frozen process. Then try Alt + F4 again.
If that still fails, use the Start menu instead. Press the Windows key, then press the down arrow key repeatedly until you reach the power icon (usually at the bottom of the menu). Press Enter, then arrow to "Shut down" and press Enter again.
On older Windows versions, you can also press Ctrl + Alt + Delete, then Tab to the power button in the bottom right corner and press Enter.
Restarting instead of shutting down
If you need to restart rather than shut down, the process is nearly identical. On Windows, press Alt + F4, then press the up arrow key once to highlight "Restart" instead of "Shut down," and press Enter.
On Mac, press Command + Control + Eject, then press the up arrow key to select "Restart" and press Enter. On Linux, type shutdown -r now instead of shutdown -h now to restart.
Using the Windows Start menu when shortcuts fail
The Start menu method works when keyboard shortcuts are not responding. Press the Windows key to open the Start menu, then press the down arrow key several times until you reach the power icon at the bottom. Press Enter to open the power options.
Once the power menu appears, use the arrow keys to select "Shut down," "Restart," or "Sleep," then press Enter. This route takes a few more key presses but works on nearly all Windows machines, even when Alt + F4 is blocked by system settings or software.
Forcing a shutdown when programs are frozen
If a program is frozen and preventing normal shutdown, close it first before shutting down the computer. On Windows, press Alt + F4 to close the active window. If the program does not close, press Alt + Tab to switch to another window, then try Alt + F4 again on the frozen program.
On Mac, press Command + Option + Esc to open the Force Quit dialog, use the arrow keys to select the frozen program, and press Enter. Then proceed with the normal Mac shutdown command (Command + Control + Eject).
If multiple programs are frozen, you may need to force-quit each one individually before the computer will shut down cleanly.
Sleep and lock options from the keyboard
If you want to put your computer to sleep instead of shutting it down completely, Windows offers a quicker route. Press Alt + F4 on the desktop, then press the Tab key to move between options. "Sleep" is usually available alongside Shut Down and Restart.
On Mac, press Control + Eject (without Command) to bring up a menu with sleep, restart, and shutdown options. On Windows 10 and 11, you can also press the Windows key + X, then press S for sleep mode.
Locking your computer without shutting it down is faster on all systems. On Windows, press Windows key + L. On Mac, press Control + Command + Q. Locking keeps your computer running but requires a password to return to your desktop.
Frequently Asked Questions
Will Alt + F4 close my files without saving them?
Yes. Most programs will prompt you to save unsaved work before closing, but some may close without asking. Save your files manually before using Alt + F4 if you have work open. If a program does close without saving, some applications have a recovery feature you can access when you restart.
Can I schedule a shutdown for a specific time using the keyboard?
On Windows, press Windows key + R, type shutdown -s -t 3600 (where 3600 is the number of seconds until shutdown), and press Enter. On Mac and Linux, use the terminal with the shutdown command followed by a time parameter. This is useful if you want the computer to shut down after you leave.
What is the difference between shutdown and restart?
Shutdown powers off your computer completely. Restart powers off and then when ready turns the computer back on. Restart is useful after installing updates or when troubleshooting problems. Shutdown is used when you are done for the day.
Does sleep mode use less power than shutdown?
Sleep mode uses far less power than running normally but more than shutdown. If you plan to use your computer again within a few hours, sleep is faster because it skips the startup process. If you will not use it for many hours or days, shutdown uses almost no power.