Firstly,
/etc/inittab is no longer used in redhat.
Instead, systemd (the new system and service manager) is used for defining default startup state.
RHEL 7 Sysadmin guide explains this really well. I'll summarise the changes with respect to inittab (default run level).
To check current default
[root@localhost grub.d]# systemctl get-default
graphical.target
Run level equivalents
Old runlevel | RedHat 7 `systemd` unit |
---|---|
runlevel0 | poweroff.target |
runlevel1 | rescue.target |
runlevel2 | multi-user.target |
runlevel3 | multi-user.target |
runlevel4 | multi-user.target |
runlevel5 | graphical.target |
runlevel6 | reboot.target |
To modify the default
In this example, we are configuring it so the GUI is not loaded upon bootup
[root@localhost grub.d]# systemctl set-default multi-user.target
[root@localhost grub.d]# systemctl get-default
multi-user.target
Does the init command still work?
Yes, if old habits die hard, you can still use init to change runlevel, although it is simply a symlink to systemd - you may as well get used to it.
[root@localhost grub.d]# ll /sbin/init
lrwxrwxrwx. 1 root root 22 Mar 14 02:58 /sbin/init -> ../lib/systemd/systemd
[root@localhost grub.d]# init 6
Or, using systemctl
[root@localhost grub.d]# systemctl reboot