How to terminate GUI in SunOS from a shell-script running it from the terminal.
You can use the
Disable the cde-login service:
Enable it back:
Or, if you want to do it old school:
Although it's been ages since the last time I had a SunOS workstation I would imagine that the GUI is typically part of the default runlevel 3 and changing to runlevel 2 would disable the GUI:
The GUI (possibly Xorg) is most likely a service you can disable with