systemd MCQ Quiz

25 questions with answer checking, score, timer, and short explanations

Total Questions
25
Answered
0
Score
0
Timer
20:00

Result

Question 1 Not answered

What is systemd in Linux?

Explanation: systemd is commonly used as PID 1 and manages services, boot targets, logs, timers, and many system processes.
Question 2 Not answered

Which command can show what process is running as PID 1?

Explanation: The command ps -p 1 displays the process with PID 1. On many modern Linux systems, this is systemd.
Question 3 Not answered

What is the main purpose of systemctl?

Explanation: systemctl is the main command-line tool used to control systemd services and other unit types.
Question 4 Not answered

Which command starts nginx immediately?

Explanation: start runs the service right now. enable only configures the service to start automatically at boot.
Question 5 Not answered

Which command makes nginx start automatically at boot?

Explanation: enable creates the needed links so the service starts during boot.
Question 6 Not answered

What is the difference between start and enable?

Explanation: start affects the current session. enable affects future boot behavior.
Question 7 Not answered

Which command starts a service now and enables it at boot in one command?

Explanation: enable --now enables the service for boot and starts it immediately.
Question 8 Not answered

Which command is used after creating or editing a systemd unit file?

Explanation: daemon-reload tells systemd to reload unit file definitions.
Question 9 Not answered

Which command shows logs for the nginx service?

Explanation: journalctl -u SERVICE shows logs for a specific systemd unit.
Question 10 Not answered

Which command follows service logs live?

Explanation: The -f option follows journal logs in real time.
Question 11 Not answered

Which systemd unit type is used to manage a background service?

Explanation: .service units define how services start, stop, reload, and restart.
Question 12 Not answered

Which systemd unit type is used for scheduled jobs?

Explanation: .timer units are used to schedule service execution, similar to cron in some cases.
Question 13 Not answered

Which systemd unit type represents a system state or group of units?

Explanation: A target groups units together and represents states like multi-user mode or graphical mode.
Question 14 Not answered

Which section of a service file usually contains ExecStart?

Explanation: The [Service] section tells systemd how to start, stop, and manage the service process.
Question 15 Not answered

What does ExecStart define?

Explanation: ExecStart specifies the exact command or program systemd runs to start the service.
Question 16 Not answered

What does WantedBy=multi-user.target usually mean in the [Install] section?

Explanation: WantedBy controls where the service is linked when enabled. multi-user.target is common for server services.
Question 17 Not answered

Where should an administrator usually place a custom systemd unit file?

Explanation: /etc/systemd/system/ is commonly used for admin-created or customized unit files.
Question 18 Not answered

Which command shows the current default target?

Explanation: systemctl get-default shows whether the system normally boots into multi-user.target, graphical.target, etc.
Question 19 Not answered

Which target is commonly used for command-line multi-user server mode?

Explanation: multi-user.target is used for multi-user CLI mode and is common on servers.
Question 20 Not answered

Which target is commonly used for GUI mode?

Explanation: graphical.target includes multi-user services plus graphical display/login components.
Question 21 Not answered

What does Active: active (running) mean in systemctl status?

Explanation: active (running) means the service process is currently running successfully.
Question 22 Not answered

What does a masked service mean?

Explanation: Masking links the unit to /dev/null and prevents it from being started until it is unmasked.
Question 23 Not answered

Which command checks whether a service is enabled at boot?

Explanation: is-enabled checks boot enablement. is-active checks current running state.
Question 24 Not answered

Which command checks whether a service is currently active?

Explanation: is-active tells whether a unit is currently active/running.
Question 25 Not answered

What is a good first troubleshooting step when a service fails?

Explanation: A good troubleshooting flow starts with systemctl status and journalctl logs to understand the failure reason.