Service Management and Boot Troubleshooting Flashcards
How can the status of a service be viewed with ‘systemctl’?
■ systemctl status .
How are ‘systemd’ loaded units listed by type?
■ systemctl {–type=unittype}
■ systemctl list-units {–type=unittype}
How can loaded units for ‘systemd’ be listed?
■ systemctl {–type=unittype}
■ systemctl list-units
How can installed units for ‘systemd’ be listed?
■ systemctl list-unit-files {–type=unittype}
How can a service be prevented from starting?
■ By masking the configuration directories used in starting the service.
■ systemctl mask network - prevent network command usage
What is the difference between a disabled service vs. a masked service?
■ A disabled service will not be started automatically at boot or by other unit files, but can be started manually. A masked service can not be started manually or automatically.
What ‘systemd’ target supports multiple users, graphical and text-based logins?
■ graphical.target
■ systemctl isolate graphical.target
What ‘systemd’ target supports multiple users, text-based logins only?
■ multi-user.target
■ systemctl isolate multi-user.target
What ‘systemd’ target presents ‘sulogin’ prompt and basic system initialization?
■ rescue.target
■ systemctl isolate rescue.target
What ‘systemd’ target presents ‘sulogin’ prompt, initramfs pivot complete and system root mounted on / read-only?
■ emergency.target
■ systemctl isolate emergency.target
How is the default ‘systemd’ target set?
■ systemctl set-default {target}
How is the default ‘systemd’ target listed?
■ systemctl get-default {target}
What steps are required to change the boot time ‘systemd’ target?
- Interrupt the boot loader menu countdown by pressing any key
- Move the cursor to the entry to be started
- Press ‘e’ to edit the current entry
- Move to the line that starts with ‘linux16’
- Append ‘systemd.unit={desired.target}’
- Press Ctrl+x to boot with these changes.
What line must be edited with the ‘systemd’ target and how?
■ The line that starts with ‘linux16’
■ ‘systemd.unit={desired.target}’ must be appended to the end
How are the different available of ‘systemd’ listed?
■ systemctl -t help