A systemd unit becomes dependent on default.target through one of these dependency relationships:
1. The unit is WantedBy= the default target
WantedBy=default.target
2. The unit is RequiredBy= the default target
RequiredBy=graphical.target
3.PartOf=default.target in unit file
PartOf=default.target
These above mentioned dependencies comes under Direct dependencies
Thanks
Unless specified differently during the boot process via the GRUB menu, systemd always defaults to starting the default.target. This default.target file acts as a symbolic link, pointing to the actual desired system state. For example, a desktop workstation usually links to the graphical.target, which is the systemd equivalent of the traditional SystemV runlevel 5. Conversely, a server typically links to the multi-user.target, which mirrors SystemV runlevel 3. It's also worth noting that the emergency.target serves a similar purpose to the old single-user mode. Ultimately, both targets and services are fundamental components, referred to in systemd terminology as systemd units.
When a unit is declared as "wanted by" or "required by" a target that sits beneath the default.target through dependencies like WantedBy=, Requires=, or another target-level dependency that unit becomes implicitly dependent on the default.target itself.
One key feature of Systemd is its use of default dependencies. This means that even if you don't explicitly define every single dependency in your unit files, Systemd automatically inserts crucial dependencies behind the scenes. These default settings ensure essential boot order and proper system operation, such as managing mount points and confirming filesystem readiness. You only need to intervene if you need to bypass this behavior entirely by setting the DefaultDependencies=no option.
https://www.freedesktop.org/software/systemd/man/latest/systemd.target.html#
Chetan, your responses do align very well with the
name - Red Hat Learning Community!!!!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.