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