How to Shut Down Computer with Keyboard
In this article
Yes, you can shut down your computer using only the keyboard. On Windows, the fastest way is to press Alt+F4 on the desktop, then Enter. On a Mac, press Control+Option+Command+Power (or Control+Option+Command+Eject on older models). This guide covers both systems, plus the safest alternative methods if those shortcuts don't work. No extra software is needed—just your keyboard and a few seconds.
What You'll Need
- A keyboard (built-in or external) connected to your computer.
- Your computer must be on and not frozen (if it's frozen, see Troubleshooting).
- For Windows: a desktop or laptop running Windows 10 or 11 (labels may vary slightly by version).
- For Mac: macOS 11 or later (older versions use similar shortcuts).
Step-by-Step
Windows (Desktop or Laptop)
- Close or minimize all open windows. Press Windows+D to go to the desktop instantly. If you have a window open, Alt+F4 will close that window instead of shutting down.
- Press Alt+F4. This opens the "Shut Down Windows" dialog box. If you're on the desktop, it will show a dropdown menu with options like Shut Down, Restart, Sleep, etc.
- Select "Shut Down" if it isn't already selected. Use the arrow keys or mouse (but you want keyboard-only) to highlight "Shut Down" in the dropdown. Usually it's the default.
- Press Enter. Your computer will begin shutting down. Wait for the screen to go black and the power light to turn off.
- Alternative: Use the Win+X menu. Press Windows+X to open the quick link menu, then press U (for Shut down or sign out), then press U again (for Shut Down). This works on Windows 10 and 11.
- Alternative: Ctrl+Alt+Delete. Press Ctrl+Alt+Delete, then press Tab to move to the power icon (bottom-right), press Enter, then use arrow keys to select "Shut Down" and press Enter.
Mac (macOS)
- Save your work. The shortcut will force a shutdown if you have unsaved changes, so save first.
- Press Control+Option+Command+Power. On a Mac with a physical power button, press Control+Option+Command+Power (the power button is the one with the ⏻ symbol). On a MacBook with Touch ID, the Touch ID button is also the power button.
- If you have an Eject key (older Macs with optical drives), press Control+Option+Command+Eject instead.
- Confirm if prompted. If you have unsaved changes, macOS will ask if you want to save them. Use arrow keys to select "Cancel" and save manually, or "Shut Down" to discard changes.
- Alternative: Use the Apple menu. Press Control+F2 to move focus to the Apple menu, then press Return to open it, then press Down Arrow to highlight "Shut Down…", then press Return. A dialog will appear; press Return again to confirm.
Common Mistakes
- Pressing Alt+F4 with a window open. This closes the active window, not the computer. Always press Windows+D first to go to the desktop.
- Using the wrong modifier key on Mac. The Mac shortcut uses Control, not Command. Pressing Command+Option+Power will sleep the Mac, not shut it down.
- Forgetting to save work. The keyboard shutdown may not give you a chance to save unsaved changes, especially on Windows if you use the Win+X method. Always save before shutting down.
- Holding the power button. Holding the physical power button for 5+ seconds forces a hard shutdown, which can cause data loss or file corruption. Only use that if the computer is completely frozen.
Tips
- Use the Win+X shortcut for speed. Once you memorize it, it's faster than Alt+F4 because you don't need to navigate a dropdown.
- On Windows, you can also press Windows+X, then U, then R to restart. This is handy if you're troubleshooting.
- On Mac, you can create a custom keyboard shortcut for Shut Down via System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts, but the built-in shortcut is usually sufficient.
- If you use a laptop, make sure the lid is not closed. Closing the lid may put it to sleep instead of shutting down, depending on your power settings.
- Check your power settings. On Windows, you can set what the power button does, but the keyboard shortcuts above are not affected by those settings.
Troubleshooting
If the keyboard shortcut does nothing:
- Check if your keyboard is working. Press Caps Lock or Num Lock to see if the light toggles. If not, reconnect or replace the keyboard.
- Try a different method. If Alt+F4 doesn't work, try Ctrl+Alt+Delete or Win+X. On Mac, try Control+Option+Command+Power again, but make sure you're pressing all four keys simultaneously.
- If the computer is frozen (no response to any keys), press and hold the physical power button for 5–10 seconds until the computer turns off. This is a last resort and may lose unsaved work.
- If the shutdown dialog appears but doesn't respond to Enter, use the Tab key to move focus to the "OK" button and press Enter, or press the spacebar.
- On Windows, if the Win+X menu doesn't show "Shut Down", the menu may be customized. Use Alt+F4 instead.
- If the computer shuts down but immediately restarts, there may be a system issue. Check your power settings (Control Panel > Power Options) to see if "Choose what the power buttons do" is set to restart. Also, check for Windows updates.
Frequently Asked Questions
Does Alt+F4 work on all Windows versions?
Yes, Alt+F4 has been a standard Windows shortcut since Windows 95. It works on Windows 10, 11, and earlier versions, as long as you're on the desktop.
Will I lose unsaved work if I use these shortcuts?
On Windows, Alt+F4 will show a "Shut Down Windows" dialog that doesn't warn about unsaved work—it just shuts down. Win+X also shuts down immediately. On Mac, the Control+Option+Command+Power shortcut will prompt you to save unsaved changes before shutting down. Always save your work first.
Can I shut down a Mac with just the keyboard without using the power button?
Yes, the Control+Option+Command+Power shortcut uses the power button, but you can also use Control+F2 to access the Apple menu and choose Shut Down, which doesn't require the power button.
What if my keyboard has a dedicated power button?
Some keyboards have a power key that can be programmed to shut down. On Windows, you can set it in Power Options. On Mac, the power key on the keyboard (if present) will bring up the shutdown dialog.
Is there a keyboard shortcut to shut down a Chromebook?
Yes, on a Chromebook, press and hold the power button for a second, or press Shift+Power (or Shift+Search+Power on some models). You can also press Ctrl+Shift+Q twice to sign out, but that doesn't shut down. There's no direct shutdown shortcut other than the power button.
Can I shut down a Linux computer with the keyboard?
Yes, on most Linux desktops, you can press Ctrl+Alt+Delete to open the shutdown dialog, or use the terminal command sudo shutdown now (requires password). The exact shortcut depends on your desktop environment (GNOME, KDE, etc.).