LFCS Service Configuration • Complete Question Bank
Complete LFCS Service Configuration question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
# systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2025-03-10 14:23:45 UTC; 1h 30min ago
Main PID: 1234 (sshd)
CGroup: /system.slice/sshd.service
└─1234 /usr/sbin/sshd -D
# netstat -tlnp | grep :22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1234/sshdDrag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
1
2
9
15
19
Refer to the exhibit.
Output of `systemctl status apache2`:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; generated; vendor preset: enabled)
Active: active (running) since Mon 2023-08-14 10:15:30 UTC; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 1234 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
Main PID: 5678 (apache2)
Warning: apache2.service changed on disk. Run 'systemctl daemon-reload' to reload units.Refer to the exhibit. [Unit] Description=My Custom Service After=network-online.target Wants=network-online.target [Service] ExecStart=/usr/local/bin/myservice.sh Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
Refer to the exhibit. Output of `journalctl -u sshd.service --no-pager -p err`: Jul 15 09:23:45 server sshd[1234]: Failed to start OpenSSH server daemon Jul 15 09:23:45 server sshd[1234]: sshd.service: main process exited, code=exited, status=255/n/a Jul 15 09:23:45 server sshd[1234]: Unit sshd.service entered failed state.
● systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2025-03-10 10:15:23 UTC; 2min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 12345 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
Main PID: 12345 (code=exited, status=255)
Status: "SSH Daemon exited abnormally"● systemctl status myapp.service ● myapp.service - My Application Loaded: loaded (/etc/systemd/system/myapp.service; disabled; vendor preset: disabled) Active: inactive (dead) Docs: man:myapp(1) ● systemctl list-dependencies myapp.service ● myapp.service ● myapp.service does not have any dependencies.
$ cat /etc/systemd/system/backup.service [Unit] Description=Backup Service After=network.target [Service] Type=oneshot ExecStart=/usr/local/bin/backup.sh User=backup Restart=on-failure RestartSec=30 [Install] WantedBy=multi-user.target $ systemctl show backup.service -p Restart Restart=no
A system administrator is managing a web application running as a systemd service on a new Linux server. The application requires a specific environment variable, DATABASE_URL, to be set before starting. The administrator has created a custom service unit file at /etc/systemd/system/webapp.service with the following content:
[Unit]
Description=Web Application Service
[Service]
ExecStart=/usr/local/bin/webapp Restart=on-failure
The administrator prefers to keep configuration separate from the unit file for easier updates. The service fails to start. Upon investigation, the administrator notices that the DATABASE_URL variable is not being passed to the process. What is the most appropriate course of action to ensure the environment variable is correctly set?
A company runs a monitoring agent service (monitor.service) that must start after the network is fully up and the DNS resolver is ready. The service currently has the following dependencies in its unit file:
[Unit]
Description=Monitoring Agent After=network.target Wants=network.target
[Service]
ExecStart=/usr/bin/monitor
The service starts, but often fails to resolve hostnames because DNS is not yet available. Which change should be made to the unit file to ensure the service only starts after DNS is ready?
myapp.service - My Custom Application Loaded: loaded (/etc/systemd/system/myapp.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2025-03-10 14:23:45 UTC; 2min ago Process: 4567 ExecStart=/usr/bin/myapp (code=exited, status=1/FAILURE) Main PID: 4567 (code=exited, status=1/FAILURE)