restart terminal command linux code example Example 1: restart server centos reboot -h now Example 2: restart computer command linux $ sudo shutdown -r now