3 Basic Commands and Simple Shell Scripts Once you have your first Red Hat Enterprise Linux rhel



Download 1.85 Mb.
View original pdf
Page38/67
Date26.02.2024
Size1.85 Mb.
#63678
1   ...   34   35   36   37   38   39   40   41   ...   67
Pablo Iranzo Gómez, Pedro Ibáñez Requena, Miguel Pérez Colino, Scott McCarty - Red Hat Enterprise Linux 9 Administration-Packt Publishing (2022) -chap 3 82 - 180
Managing boot targets
The default status we have defined at boot is important when it comes to talking about runlevels.
A runlevel defines a predefined set of services based on usage that is, they define which services will be started or stopped when we’re using a specific functionality.
For example, there are runlevels that are used to define the following Halt mode
Single-user mode

Managing system services with systemd
111
Multi-user mode
Networked multiuser
Graphical UI
Reboot
Each of those runlevels allows a predefined set of services to be started/stopped when the runlevel is changed with init $runlevel. Of course, levels used to be based on each other and were very simple, as outlined here Halt stopped all the services and then halted or powered off the system Single-user mode started a shell for one user Multi-user mode enabled regular login daemons on the virtual terminals Networked was like multi-user but with the network started Graphical was like networked but with graphical login via display manager (gdm or others Reboot was like halt, but at the end of processing services, it issued a reboot instead of a halt.
These runlevels (and the default one when the system is booted) used to be defined in /etc/inittab, but the file placeholder reminds us of the following inittab is no longer used ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl- alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run systemctl get-default
#
# To set a default target, run systemctl set-default TARGET.target
So, by making this change to systemd, anew way to check the available boot targets and define them is in place.

Tools for Regular Operations
112
We can find the available system targets by listing this folder:

Download 1.85 Mb.

Share with your friends:
1   ...   34   35   36   37   38   39   40   41   ...   67




The database is protected by copyright ©ininet.org 2024
send message

    Main page