restart linux server from the command line code example Example 1: command to restart linux sudo reboot Example 2: reboot server linux sudo shutdown –r or sudo reboot