Change runlevels, boot targets and shutdown (3) Flashcards
Objective 101.3 Weight 3
Which of the following locations are potential locations for systemd unit files?
- /usr/lib/systemd/
- /run/systemd/
- /etc/systemd/
- /etc/init.d/
- /etc/systemd/init.d/
- /lib/systemd/
- /usr/lib/systemd/
- /run/systemd/
AND - /etc/systemd/
The systemd unit files may reside in /usr/lib/systemd/, /run/systemd/, or /etc/systemd/. Though some distributions do not have the /run/systemd/ directory.
Which of the following commands will shut down the system completely and power it off, if it is a systemd system?
- systemctl isolate reboot
- systemctl isolate poweroff
- systemctl isolate halt
- shutdown
- halt
- poweroff
- systemctl isolate poweroff
- systemctl isolate halt
- shutdown
- halt
AND - poweroff
All the commands, except systemctl isolate reboot, will shut down the system completely and power it off, if it is a systemd system, and super user privileges.
Which of the following command will move the system from its current systemd target to the emergency target on a systemd system?
- init 1
- telinit 1
- systemctl isolate emergency
- systemctl isolate emergency.target
- systemd isolate emergency
- systemd isolate emergency.target
- systemctl isolate emergency
AND - systemctl isolate emergency.target
Because you don’t need to add the .target to the command, both the systemctl isolate emergency and the systemctl isolate emergency.target commands will move the system from its current systemd target to the emergency target on a systemd system, if you have super user privileges. The init and telinit commands are used on SysVinit systems, and not those that use systemd system initialization.
Which of the following SysVinit runlevels were for systems that needed network services started, and a Graphical User Interface provided?
- runlevel 1
- runlevel 2
- runlevel 3
- runlevel 4
- runlevel 5
- runlevel 6
- runlevel 2
AND - runlevel 5
Most SysVinit distributions used runlevel 5 to provide both network and GUI services. However, before it switched to Upstart and then systemd for system initialization, Ubuntu used runlevel 2 instead of runlevel 5 to provide network and GUI services.
What command should be executed after modifying /etc/inittab?
telinit q or telinit Q should be executed. This command tells init to reload its configuration. If not reloaded, the system may halt due to an incorrect /etc/inittab configuration