Exercises

Exercises

Questions & Answers

What is the purpose of systemd?

CLICK FOR ANSWER

Create and manage services.

What is systemctl?

CLICK FOR ANSWER

The CLI package that allows for managing services.

What is a unit file?

CLICK FOR ANSWER

A service definition file. It configures the service and dictates how the service behaves and how it is managed by systemd.

What are the five primary commands of systemctl introduced in this class?

CLICK FOR ANSWER
  1. status
  2. start
  3. stop
  4. disable
  5. enable

Which of the five commands is necessary to view information about a given unit?

CLICK FOR ANSWER

status

Which of the five commands are necessary for managing a units state?

CLICK FOR ANSWER
  • start
  • stop

Which of the five commands are necessary for controlling when a unit starts at a specific computer target?

CLICK FOR ANSWER
  • enable
  • disable

What must be included in a unit file to start a service?

CLICK FOR ANSWER
[Service]
ExecStart=valid command to start the service

What must be included in a unit file to configure a unit to restart on failure?

CLICK FOR ANSWER
[Service]
Restart=on-failure

What must be included in a unit file to configure a unit to start at a specific computer target (like on boot)?

CLICK FOR ANSWER
[Install]
WantedBy=some-defined.target