12 responses

  1. no way
    August 14, 2017

    This is idiotic, why risk a terminal mistake when you can simply go to Apple upper left of screen and click shut down. If you are connected remotely this works exactly the same.

    I guess OSXDaily is just running out of good advice, and posting bad in it’s place.

    • Fool Factory
      August 14, 2017

      “no way” you personally should definitely stick to novice level material like your little Apple menu trick because this is obviously over your head, which is fine, you’re a novice level user. Everyone starts somewhere.

      If you don’t know why people use the Terminal or would want to shutdown from the command line you should probably not comment about it, it makes you sound even less intelligent than your comments already are.

    • Darren O’Brien
      August 14, 2017

      Actually shutting down a Mac by command is very useful to every sysadmin.

      If you don’t understand a subject but you attack that subject because you don’t understand it yourself, that makes you the idiot. You’re being willfully ignorant. In fact, you would be less of an idiot yourself if you bothered to learn a thing or two.

      • no way
        August 16, 2017

        I understand the subject perfectly well, have been a system admin and senior level repair for Apple for over two decades.

        Instead of whining and trash talk prove me wrong.

        Bottom line doing ANYTHING via terminal remotely is a risk that no experienced tech would ever do when they can do it via the user commands.

      • Uhuh
        January 30, 2018

        Well… your nick certainly suits you… because there is NO WAY you’ve been a sysadmin for over two decades and haven’t happened upon a situation where you’ve needed to shutdown a Mac via the CLI.

        For one, as a true sysadmin, I SSH into our Macs (typically moreso the servers – Minis, etc – but also the workstations on occasion), and shutting down/restarting via command line is the quickest option.

        For two, it’s what a true sysadmin would be used to, having administered mixed platform environments including *NIX, Windows and Mac systems.

        For three, using the shutdown command via the terminal CLI is no more “dangerous” than choosing the wrong menu item or clicking the wrong button on a GUI… and it’s 10x’s more efficient because I don’t have to stop and reach for a mouse.

        So, really, you’re definitely not inspiring confidence in your sysadmin skills right now… especially if you don’t think you can accurately type an 8 letter command in a terminal.

  2. Sam
    August 14, 2017

    This advice is just plain wrong and will lead to corruption and lost data if you follow it. DO NOT follow this advice.

    Both commands send programs a UNIX style shutdown command. GUI programs do not expect this and will terminate WITHOUT giving you the chance to save your data or clean themselves up. (Specifically, Cocoa apps do not see applicationShouldTerminate: or the kAEQuitApplication Apple Event)

    The correct way to safely shutdown from the command line is “osascript -e ‘tell app “System Events” to shut down'”

    • Erik
      August 14, 2017

      Sam, you’re wrong. This shuts down a Mac from the command line. Did you even bother read the article? Obviously not. There are multiple warnings that it does not request a data save. There’s a giant paragraph at the beginning of the article.

      How did you manage to get this far without reading the article? Maybe this site needs a system to verify that people read the article before they can comment.

      “An important word of warning: shutting down a Mac through the command line happens instantaneously. There is no confirmation, no warning dialog, no stopping to save documents, no asking to close apps or save anything. Instead, the Mac will instantly terminate any and all activity going on and immediately shut down the computer. This could lead to data loss, so be sure you are ready to turn off a Mac if you issue these commands.”

      Also to say it is “wrong” is itself wrong, because “wrong” is by definition incorrect. The article is correct, even if you don’t agree with it. That makes it TRUE.

      Why don’t you do your own research, type “man shutdown” into the command prompt and you will see that it is REAL and TRUE. Facts matter.

      • Sam
        August 14, 2017

        You are wrong about reading the man page. The man page was never updated for macOS. Read the bottom of the man page. It says “BSD December 11, 1998”. That means Apple never updated the man page for OS X, otherwise it would say DARWIN or macOS (try man diskutil or pmset). Therefore do NOT trust the information.

        There is NO reason to use BSD shutdown unless the system is stuck. There is a perfectly good command line method which I provided, which is safe and does not result in data loss.

        In general, Apple does recommend applications or users work with the BSD interfaces and utilities in macOS. This is a prime example why.

      • Gombo
        August 15, 2017

        Sam if you’re booted into recovery or single user as root and need to shutdown a Mac, how do you propose doing that?

        The answer is the shutdown command.

  3. Dan Uff
    August 14, 2017

    Well, for those of us who use the Terminal this trick is appreciated. Thank you.

  4. mike
    August 18, 2017

    The “reboot” command was not listed, but is sometimes very handy.

  5. Endymion
    August 20, 2017

    Today we have only seven ladder manufacturers in the US, down from >100. Why; not globalization, nor a decline in the market but rather the lawsuits from people who fell off ladders and sued all the small operations. The desire for an idiot-proof world is here again on this thread. CLI and its risk/benefits are not for the foolhardy. People like this are the reason why construction trucks make that beeping noise when backing-up.

Leave a Reply




Back to top