how to restart a computer from the command line linux code example Example: restart computer command linux $ sudo shutdown -r now