This tutorial will walk you through how to restart a computer from the command prompt or terminal in both Windows and Mac. To restart in Apple Diagnostics mode, you will use this key combination: Hold the Power Button + the 'D' button You will hold both of these buttons until a screen appears that asks you for your language. When you choose your language, a progress bar will appear showing the status of the diagnostic test. Dec 21, 2020 This option uses the holy 3-key-trifecta to restart your Macbook. CONTROL + OPTION + EJECT (a key located above the Delete key, next to F12). These three keys will do the same thing as the power button. If your computer has really gone rogue, you may have to hold this 3-key-combination down for a few seconds until you hear your Mac power down. Restart your Intel-based Mac in Safe Mode. Press the Power button for seconds to force shut it down. Wait about 10 seconds. Press the Power button to restart your Mac and immediately press & hold the Shift key. Release the Shift key when you see the login screen. Restart your Mac with Apple silicon in Safe Mode. Here is how to force restart a Mac and what to do if your MacBook is frozen. We’ll explain how to force shutdown your Mac with the stroke of a button.
Welcome to a tutorial on how to restart a computer from the command prompt (or terminal if you are using Mac). Have an unresponsive user interface? Need to force restart a semi-conscious computer? Or writing a maintenance script to reset the computer? Long story short, to restart a computer from the command or terminal:
- Windows: Start-R > Type in “cmd” and “enter” > Type in “shutdown /r” in the command prompt.
- Mac: Command-Space > Type in “terminal” and “enter” > Type in “sudo reboot” in the terminal.
But there’s a little bit more to how we can play with these commands, and alternatives when the computer is totally not responding. Read on to find out!
TABLE OF CONTENTS
WINDOWS RESTART & SHUTDOWN
The command to shut down or restart a Windows computer is “shutdown”. But over the many years, it has evolved to become more capable and complicated.
ALL THE SHUTDOWN OPTIONS
To get all the options, simply type
shutdown /? in the command prompt:
BASIC SHUTDOWN PROCEDURES
Most beginners will probably freak out immediately at how many options
shutdown has, but there are only 4 basic ones to take note of:
shutdown /sShuts down the computer.
shutdown /rRestarts the computer.
shutdown /lLog off.
Yep, that’s all to it.
FORCE SHUTDOWN A STUBBORN PC
If an application or process is blocking the shutdown or reset, we can use
shutdown /p /f to force a shutdown… No warnings will be given, and it will act immediately.
MAC RESTART & SHUTDOWN
There are 3 commands to shut down a Mac – shutdown, halt, and reboot. Of course, being a Unix based system, these commands will also work on Linux… Although things might somewhat vary depending on the Linux build.
THE SHUTDOWN SYNTAX
Unlike Windows, the
shutdown command is very cryptic… Which is even scarier for beginners. But in short, the
sudo part is “run as administrator”, and it has a syntax of
shutdown [OPTIONS] [TIME] [MESSAGE].
shutdown -hHalt the system.
shutdown -rReboot the system.
shutdown -sPut the system into sleep mode.
shutdown -kMore for Mac server usage. Does not shut down, but kick everyone off the system.
The shutdown time is required, and there are generally 3 ways to define it:
shutdown -h nowRight now.
shutdown -h 12:34An exact time.
shutdown -h +15Specified minutes later.
This is optional and will serve a warning message to all users who are logged on to the Mac before shutting down or resetting.
HOW ABOUT HALT AND REBOOT?
In the layman terms:
shutdown -his equals to calling
shutdown -ris equals to calling
But not really… It’s kind of confusing. But
reboot all belong to the same system module that deals with shutting down and rebooting.
That’s it for the shutdown commands, and here are a few extra bits that may be useful to you.
Hold your horses, before you force a reset or power down, there might still be hope.
- Windows – Press Ctrl-Shift-Escape to fire up the task manager. Select and close the application that is not responding.
- Mac – Press Option-Command-Escape to fire up the force quit dialog box. Select and close the application that is not responding.
FORCE POWER OFF
If the shutdown commands will not even work, the last straw is to call for a hard power off – Press and hold the power button for at least 4 seconds to force a power down; This is a function on the motherboard and not the operating system… If it still does not power down, it might be a hardware problem instead of software.
Where Is Restart Button On Mac
LINKS & REFERENCES
See More Results
Thank you for reading, and we have come to the end of this guide. I hope that this has helped you to better understand, and if you have anything to share with this guide, please feel free to comment below. Good luck and happy blogging. May the force be with you.