restart xwindows code example
Example 1: restart crontab
sudo service cron reload
Example 2: restart server centos
reboot -h now
Example 3: how to restart x window manager in ubuntu 18.04
sudo systemctl restart display-manager
sudo service cron reload
reboot -h now
sudo systemctl restart display-manager