SEND reboot over console code example Example 1: How to restart Ubuntu via SSH? sudo service ssh restart Example 2: shut down computer in terminal linux sudo poweroff