What are common systemd targets?

Here are some common systemd targets used in Linux systems:

  1. default.target:

    • The target that the system boots into by default. It is usually a symbolic link to another target, such as multi-user.target or graphical.target.
  2. multi-user.target:

    • Similar to runlevel 3 in SysVinit, this target allows multiple users to log in via the command line without a graphical interface. It is commonly used for servers.
  3. graphical.target:

    • Similar to runlevel 5, this target starts the graphical user interface along with multi-user services. It is used for desktop environments.
  4. reboot.target:

    • This target is used to reboot the system. It ensures that all services are stopped properly before the system restarts.
  5. halt.target:

    • Used to halt the system. It stops all services and powers down the system.
  6. poweroff.target:

    • Similar to halt.target, this target powers off the system completely.
  7. emergency.target:

    • Provides a minimal environment for troubleshooting. It starts only the essential services and drops the user into a root shell.
  8. rescue.target:

    • Similar to emergency.target, but it starts more services, allowing for more extensive troubleshooting while still being in a limited environment.
  9. suspend.target:

    • Used to suspend the system, putting it into a low-power state.
  10. hibernate.target:

    • Used to hibernate the system, saving the current state to disk and powering off.

Managing Targets

You can view the current default target with:

systemctl get-default

To change the default target, use:

sudo systemctl set-default <target-name>

Further Learning

For more detailed information about each target and their configurations, you can refer to the official systemd documentation.

If you have any more questions or need clarification on specific targets, feel free to ask!

0 Comments

no data
Be the first to share your comment!