Most of my servers are running RHEL 6.9, but some are running 7.4 and one has xwindows installed. Changing the runlevel is different now.

To check the current runlevel in RHEL 6.X:

# runlevel

To disable the GUI at boot-up in RHEL 6.x:

 # vi /etc/inittab

Edit /etc/inittab and change the line id:5:initdefaultĀ  to id:3:initdefault

Save the file and reboot to confirm.

To check the current runlevel in RHEL 7.X:

#  systemctl get-default

To disable the GUI at boot-up in RHEL 7.x:

 # systemctl set-default multi-user.target

Save the file and reboot to confirm.

 

Be soical and share.