Restarting and shutting down a pc remotely is a frequent activity for distant system directors. As somebody that writes many shell scripts, I additionally discover myself automating system restarts. Let’s take a look at just a few methods to restart Mac methods from command line!
Restart a Native Mac
To restart a neighborhood Mac system from command line, you may execute:
sudo shutdown -r now
Restart a Distant Mac
To restart a distant Mac system, you may execute:
ssh -l {AdminSystemAddress} sudo shutdown -r now
Restart at a Particular Time
You possibly can specify a restart at a particular time:
# Format: sudo shutdown -r hhmm # Restart at 11:30pm native time sudo shutdown -r 2330
System restarts are good after large updates or simply for clearing out system assets. These command line examples ought to assist restart a Mac regionally or remotely.
JavaScript Promise API
Whereas synchronous code is less complicated to comply with and debug, async is mostly higher for efficiency and suppleness. Why “maintain up the present” when you may set off quite a few requests without delay after which deal with them when every is prepared? Guarantees are turning into an enormous a part of the JavaScript world…
Source link