shutdown -t 0 -s Share Improve this answer Follow answered at 3:55 Stephen Jennings 23.1k 5 71 106 If its not possible with Telnet, Ill try one of these options, thanks.
The system is rebooted at the specified time. Or, you can use PsExec and call the shutdown command.
#MAC SHUTDOWN COMMAND LINE MAC#
In Terminal, type the following command, and then press Enter: pmset displaysleepnow Your Mac will now be in sleep mode. Type Terminal in the Search bar, and then click it when it appears in the search results. If -h or -r is specified, shutdown will execute halt(8) or reboot(8) instead of sending a signal to launch(8). It can also be shut down by pressing Control + Option + Command + Power key/button (or Media Eject key) or clicking Shut Down on the Apple Menu while. Press Command+Space to open Spotlight Search. If the -o is specified, prevent the file system cache from being flushed by passing -n option to halt(8) or reboot(8). The -k option does not actually halt the system, but leaves the system multi-user with logins disabled (for all but super-users). The system is halted at the specified time. Below, we’ve included the complete list of shut down switches and descriptions from Apple. The two methods we covered above are only two of the many ways you can shut down your Mac in Terminal. I would use this in scripts that need to force a shutdown.Other Command Prompt Shutdown Switches and Parameters + Done bash -c "date sleep 5 /cygdrive/c/Projects Here is the command for /f 'tokens' f in type pathtomysqlrootpassword.
#MAC SHUTDOWN COMMAND LINE WINDOWS#
In this example, I do the exact same thing except that I spam the enter key a few times to show you that I'm at a prompt during the sleep. windows macos dos mysqladmin Share Follow edited at 11:05 asked at 10:58 Jigar 3,206 1 27 51 Add a comment 1 Answer Sorted by: 0 Solved. I used the date command to illustrate how long the sleep was. You can do it by background-ing a bash command. The command has to be run as root so you need to use sudo. It is possible to get second granularity for the shutdown command. The command takes a parameter -h, -r or -s to shut down, restart or sleep the Mac.
#MAC SHUTDOWN COMMAND LINE PASSWORD#
When you are done, you can simply hit the return key and then authenticate the command using an administrative password to enable you to immediately shut down the Mac. On your Mac, do one of the following: Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal. NOTE: the command backgrounds everything in the paren, the commands will sleep for 5 seconds then shutdown now. Enter the following syntax command below: sudo shutdown -h now 3. Executing the shutdown command via the terminal app will shutdown, restart, or put your computer in sleep mode depending on the argument used. In a nutshell do: (sleep 5 & shutdown now) &
