restart ubuntu from terminal code example
Example 1: How to restart Ubuntu via SSH?
sudo service ssh restart
Example 2: restart terminal command line ubuntu
#To reset Terminal:
$ reset
#To rerun/restart your bash.rc
$ source ~/.bashrc
#To Restart your computer
$ reboot
Example 3: centos reboot
shutdown -r now