I'm not sure if its only me, but I sometimes have trouble shutting down, or rebooting my Mac. I have all the latest patches, but yet I still sometimes encounter situations where after I hit the shutdown option, it just hang there. I could even launch applications after I have shutdown. Luckily, there is a way to shutdown/reboot the Mac from the command line.
To do that, do the following:
- Launch the application Terminal. You can find it in the Applications folder, or Spotlight
- Type sudo shutdown -h now to shutdown, or sudo shutdown -r now to reboot
- Enter the password of the current user account that you have login.
That's all to it. Hope it helps...
10 comments:
even shorter:
sudo halt
If I understand correct, the Mac halt will kill processes off to shutdown the machine.
The shutdown command will instead shutdown processes cleanly, so that there will be less chances of any corruption.
Erm, why not just press and hold the power button for > 5 secs?
Then the Mac will force shutdown.
This is more for techies that who needs to shutdown the mac remotely. :)
Unquestionably believe that which you stated. Your favorite justification seemed to be on the net the easiest thing to be aware of. I say to you, I definitely get annoyed while people think about worries that they plainly don't know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks
Thank you for the tip! You just saved my life :) I couldn't reboot (really) remote computer because things went really wrong there. I did reboot from the command line as you suggested though.
Again, thank you!
Likewise, thanks for posting this - saved me a journey!
Is it possible to restart the mac in a specific mode from terminal? For example, type some code in termainl that tells the mac to shut down, and when it reboots to reboot in safe mode or recovery mode etc? I have a non supported GFX card in so I don't see anything until osx has loaded. Hope that makes sense?
If I want to shutdown the Mac through terminal and that too a schedule shutdown. What is the command?
A cron job can be configured to run a task on startup or shutdown and run a script file.
Post a Comment