terminal restart cmd code example Example 1: restart server centos reboot -h now Example 2: shut down computer in terminal linux sudo poweroff