How do I shut down remote and local system from terminal? [closed]

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.

7

1 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.

5

You Might Also Like