Reboot a Server from Command Line?

Try using the following command to safely reboot:

sudo reboot

If, instead, you want to shut down the server safely, use this command:

sudo shutdown -h now

For reboot, type the following

sudo shutdown -r now

As an alternative to sudo shutdown -r now, this command also effects an immediate shut-down:

sudo shutdown -h +0

Add the -r command to reboot:

sudo shutdown -r -h +0

Output (running as root):

root@mydevwkstn:~# shutdown -r -h +0

Broadcast message from cjbs@mydevwkstn
        (/dev/pts/10) at 14:41 ...

The system is going down for halt NOW!
root@mydevwkstn:~#