using terminal command to reboot mac code example Example: terminal restart mac To restart your computer, type shutdown /r.