Shutting down & restarting: keyboard commands for Windows and macOS

A frozen PC can be frustrating and difficult to manage. In cases where the mouse and power button aren’t successful, it may be time to use a keyboard shortcut for shutting down or restarting your PC.

Depending on the type of PC you have, the exact steps to shut down or restart with your keyboard can vary. On Windows, typically Alt + F4 will work. On Mac computers, click Control + Option + Command + Power/Eject/Touch ID, depending on your Mac computer model.

Read on to learn all about shutting down and restarting your computer with your keyboard, the different methods for doing so, advanced techniques, and more.

Shutting down & restarting: keyboard commands for Windows and macOS

Keyboard shortcut for shutdown on Windows

Looking for a keyboard shortcut for shutdown on Windows PC? Use one of these shortcuts to restart your PC with your keyboard:

  • Alt + F4: In order for this shortcut to work, you’ll need to be on the desktop with no windows in focus. Hit these keys to open the “Shut Down Windows” dialog. Then, use the arrow keys to select shutdown. If this shortcut doesn’t work, check if a window is active and verify your keyboard is responsive.
  • Ctrl + Alt + Delete: No matter what you have in focus, this keyboard shortcut for shutdown will work. It brings up the Windows Security screen. You can then use the Tab key and arrows to select shutdown from the power icon.
  • Win + X → U → U: To navigate through the Windows menu and shut down Windows with your keyboard, use this quick shortcut sequence.

Tip: These shortcuts work whether you’re looking to shut down a laptop or desktop with your keyboard.

How to restart Windows with the keyboard

Instead of simply shutting down your PC, you can restart your PC with your keyboard. Restarting is different from shutting down and is a handy command when your keyboard does not reconnect after reboot. Follow these steps for restarting Windows with a keyboard:

  • Alt + F4: Just like in the case of a shutdown, this command only works on the desktop when no windows are selected. Once you pull up the “Shut Down Windows” dialog, use the arrow keys to select restart.
  • Ctrl + Alt + Delete: Again, this command works for restart just as it does for shutdown. Press these keys, then tab and arrow to select restart.
  • Win + D, then Alt + F4: If you have a window open, this is a handy shortcut to restart Windows with your keyboard. Press Win + D to get to your desktop, then use the Alt + F4 command to bring up the “Shut Down Windows” dialog.

Mac keyboard shortcut for shutdown or restart

Shutting down or restarting your computer with your keyboard is quite straightforward on Mac computers. For those with Intel based Mac computers , these shortcuts can be especially useful and serve as a great example of Intel Macintosh compatibility with macOS keyboard commands. Depending on your Mac model, you can follow these steps.


Keyboard shortcut for shutdown on Mac

  • Control + Option + Command + Power/Eject: This keyboard shortcut for shutdown works on Intel based Mac computers. If you have an eject key, press it. If you don’t, press the power button.
  • Control + Option + Command + Touch ID: Newer Macs don’t have a power or eject button. In these cases, use this keyboard shortcut to shutdown your Mac.


Keyboard shortcut for restart on Mac computers

  • Control + Command + Power/Eject: Use this shortcut to force a restart on your Intel based Mac computer. Use either the power or eject keys, whichever corresponds with your keyboard.
  • Control + Command + Touch ID: If you don’t have an Intel based Mac, you won’t have the power or eject keys. Instead, use the Touch ID in their place.


Startup key combinations on Mac computers

On newer Macs with Apple Silicon, startup options are very simple to access:

  1. Turn off your Mac.
  2. Press and hold the power (Touch ID) button until “Loading startup options” appears.
  3. From there, you can:
    • Select a startup disk
    • Enter macOS Recovery
    • Access Safe Mode (hold Shift while selecting your startup disk)
    • Use other recovery and diagnostic tools

You can use the following startup key combinations on an Intel based Mac computer. To use them, press and hold the keys right after pressing the power button to turn the computer on or after it begins to restart. 

  • Command + R: Start up from the built-in macOS Recovery system. To start up from macOS Recover over the Internet, using Option + Command + R or Shift + Option + Command + R.
  • Option or Alt: Start up to Startup Manager and choose from available startup disks or volumes.
  • Option + Command + P + R: Reset non-volatile random access memory (NVRAM) or Parameter RAM (PRAM). Note that your Mac will ignore this key combination and start up from macOS Recovery if you’re using a firmware password.
  • Shift: Start up in safe mode. This is disabled when using a firmware password.
  • D: Start up to the Apple Diagnostics utility. Use Option + D to start up to this utility over the Internet. Note that this combination is disabled when using a firmware password.
  • N: Start up from a NetBoot server if your Mac computer supports network startup volumes. Hold down Option + N instead to use the default boot image on the server. Note that this is disabled when using a firmware password.
  • Command + S: Start up in single-user mode. This is disabled in macOS or Mojave or later. Also disabled when using a firmware password.
  • T: Startup in target disk mode. This is disabled when using a firmware password.
  • Command + V: Startup in verbose mode. This is disabled when using a firmware password.
  • Eject or F12 or mouse button or trackpad button: Eject removable media. This is disabled when using a firmware password.


Keyboard shortcut for frozen apps

If a single app is frozen, but others are working, you can force that app to shut down using Command + Option + Esc. This will pull up a list of applications that you can force quit. Use the arrows to scroll through the list, then press the return key when you’ve found the app you want to quit.

What to do when shutdown shortcuts don’t work

Are you finding that you’re unable to restart your computer with your keyboard? Use this list to troubleshoot some of the most common issues:

  • Keyboard not recognized at boot: This is particularly common for Bluetooth® keyboards. Try a wired keyboard or connect a wireless one directly via USB.
  • Shortcut entered too early or too late in the boot sequence: Wait a few seconds after boot before pressing key combinations.
  • macOS firmware password disables startup key combos: On Mac computers, use built-in keyboard if using Boot Camp or third-party boards.

How to create a custom shutdown shortcut (Windows)

Windows users with advanced PC skills can create custom keyboard shortcuts for shutdown. Consider creating these shortcuts: 

  • For shutdown: Create a desktop shortcut with the command: shutdown /s /t 0. Assign a custom hotkey in the shortcut properties (e.g., Ctrl + Alt + S).
  • For restart: shutdown /r /t 0.
  • To force shutdown: shutdown /f /s /t 0. Use this command cautiously.

Shutdown vs sleep vs hibernate: what’s the difference?

Shutting down and restarting your laptop aren’t the only commands you can do. Let’s define the most common commands for your PC.

  • Shutdown: Closes everything and powers off.
  • Restart: Reboots the OS, useful for updates or troubleshooting.
  • Sleep: Keeps session in RAM; fast resume.
  • Hibernate: Saves session to disk; uses no power.

Stay in control with keyboard shortcuts for shutdown

When your PC is frozen, your Logitech® keyboard can help you resolve the issue. In a few short clicks, you can revive a frozen or overwhelmed computer. Use these commands to shut down or restart your computer using your keyboard.

Logitech and Logi are trademarks or registered trademarks of Logitech Europe S.A. and/or its affiliates in the U.S. and other countries. Apple, Mac, macOS are trademarks of Apple Inc. Windows is a trademark of Microsoft Corporation. Intel is a trademark of Intel Corporation and/or its subsidiaries. The Bluetooth word mark is a registered trademark owned by Bluetooth SIG, Inc. and any use of such marks by Logitech is under license.