Blog
Restarting a Server via SSH
sudo shutdown -r now
<===> Toto RESTARTUJE! PC okamzite // With this command it’s possible to schedule a shutdown or restart for a future time, and you can choose between shutting down or restarting the server. To immediately reboot the server (much like with the reboot command),sudo shutdown now
<===> Toto VYPNE!! PC okamzite
reboot
<===> this will only work if you have the necessary permissions. Ordinarily this requires you login in as root, or a user that’s been given root privileges. Keep in mind that th “reboot” command will reboot the server right away, by telling all processes to gracefully save their work and exit.
## Beyond the simple “reboot” command, there are several other ways to restart a server while connected to SSH. For example, you might use these if you want to reboot or shutdown the server at a scheduled time. The relevant commands include shutdown, init, and systemctl.
Strana 114 z 183