Page 61 - RHEL8 BOOK
        P. 61
     1. To display the current runlevel of your system
          [root@rhel07a ~]# systemctl get-default
          or
          [root@rhel07a /]# ls -al /lib/systemd/system/runlevel*
          [root@rhel07a /]# cat /etc/inittab
           Runlevel  Systemd Description
           0          poweroff.target
           1          rescue.target
           2          multi-user.target
           3          multi-user.target
           4          multi-user.target
           5          graphical.target
           6          reboot.target
          2. change the runlevel from "graphical.target" to "multi-user.target". (Runlevel 5 to Runlevel 3).
          [root@rhel07a /]# rm /etc/systemd/system/default.target
          rm: remove symbolic link ‘/etc/systemd/system/default.target’? y
          [root@rhel07a /]# ln -s  /lib/systemd/system/runlevel3.target  /etc/systemd/system/default.target
          [root@rhel07a /]# systemctl get-default
          runlevel3.target
          3. The runlevel target can be changed by using the systemctl isolate command:
          [root@localhost ~]# systemctl isolate multi-user.target
          4. To view what targets are available you can issue the list-units option with the type target
          [root@localhost ~]# systemctl list-units --type=target
          5. Run level 3 is emulated by multi-user.target. This is done by symbolic link and can be used
          interchangeably
          [root@localhost ~]# systemctl isolate multi-user.target
          [root@localhost ~]# systemctl isolate runlevel3.target
          [root@localhost ~]# ls -l /usr/lib/systemd/system/runlevel3.target
          lrwxrwxrwx 1 root root 17 Oct 18 11:41 /usr/lib/systemd/system/runlevel3.target -> multi-user.target
          6. Run level 5 is emulated by graphical.target. This is also done by symbolic link and can be used
          interchangeably
          [root@localhost ~]# systemctl isolate graphical.target
          [root@localhost ~]# systemctl isolate runlevel5.target
          # ls -l /usr/lib/systemd/system/runlevel5.target
          lrwxrwxrwx 1 root root 16 Oct 18 11:41 /usr/lib/systemd/system/runlevel5.target -> graphical.target
                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           61
     	
