Starting X on Boot on Red Hat Linux Baesd Systems
The Tip Show How to Automatically Switch between Server and Graphical Desktop Environment on Boot for CentOS/Red-Hat/Oracle Enterprise 7/8/9 GNU/Linux Systems.
The Systems make use by default of systemd, and systemd uses ‘targets’ instead of runlevels.
Switching Desktop
To Switch to:
- Graphical Desktop
su -c "ln -f /lib/systemd/system/graphical.target /etc/systemd/system/default.target"
- Server
su -c "ln -f /lib/systemd/system/multi-user.target /etc/systemd/system/default.target"
- Graphical Desktop