restart x session ubuntu code example Example: how to restart x window manager in ubuntu 18.04 sudo systemctl restart display-manager