A runlevel is one of the modes that a Unix-based OS will run on. Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine.
The following runlevels are defined by default under Red Hat Enterprise Linux:
|3||Multi-User Mode with Networking|
By executing command runlevel in RHEL6. You can find the current run level.
If you want to check change the runlevel permanently . Then need to edit /etc/inittab
Now your runlevel will be permanent.
Be very careful when editing /etc/inittab Simple typos can cause the system to become unbootable.
Want to change runlevel from terminal? Let say if you want to change to runlevel 3
RHEL 7 & RHEL 8
By executing command runlevel in RHEL7. You can find the default run level.
In order to change default target:
systemctl set-default graphical.target rm '/etc/systemd/system/default.target' ln -s'/usr/lib/systemd/system/graphical.target''/etc/systemd/system/default.target
Runlevel change in RHEL 7 :
Switch to ‘runlevel 3′ by running
systemctl isolate multi-user.target
Switch to ‘runlevel 5′ by running
systemctl isolate graphical.target