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