How can I shut down and restart local machine from terminal?
How can I shut down and restart remote systems from terminal. I have remote IP.
71 Answer
For remote systems, you can do ssh <user>@<ip> sudo -c "shutdown -hf now" for shutdown or ssh <user>@<ip> sudo -c "shutdown -rf now" for restart.
For local systems, you can do sudo shutdown -hf now for shutdown or sudo shutdown -rf now for restart.