{"id":4392,"date":"2022-12-20T17:49:09","date_gmt":"2022-12-20T20:49:09","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemd-target-man5\/"},"modified":"2022-12-20T17:49:09","modified_gmt":"2022-12-20T20:49:09","slug":"systemd-target-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemd-target-man5\/","title":{"rendered":"SYSTEMD.TARGET (man5)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD.TARGET<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#AUTOMATIC DEPENDENCIES\">AUTOMATIC DEPENDENCIES<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd.target \u2212 Target unit configuration<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>target<\/i>.target<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">A unit configuration file whose name ends in &#8220;.target&#8221; encodes information about a target unit of systemd, which is used for grouping units and as well\u2212known synchronization points during start\u2212up.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This unit type has no specific options. See <b>systemd.unit<\/b>(5) for the common options of all unit configuration files. The common configuration items are configured in the generic [Unit] and [Install] sections. A separate [Target] section does not exist, since no target\u2212specific options may be configured.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Target units do not offer any additional functionality on top of the generic functionality provided by units. They exist merely to group units via dependencies (useful as boot targets), and to establish standardized names for synchronization points used in dependencies between units. Among other things, target units are a more flexible replacement for SysV runlevels in the classic SysV init system. (And for compatibility reasons special target units such as runlevel3.target exist which are used by the SysV runlevel compatibility code in systemd. See <b>systemd.special<\/b>(7) for details).<\/p>\n<h2>AUTOMATIC DEPENDENCIES <a name=\"AUTOMATIC DEPENDENCIES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Implicit Dependencies<\/b> <br \/> There are no implicit dependencies for target units.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Default Dependencies<\/b> <br \/> The following dependencies are added unless <i>DefaultDependencies=no<\/i> is set:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 Target units will automatically complement all configured dependencies of type <i>Wants=<\/i> or <i>Requires=<\/i> with dependencies of type <i>After=<\/i> unless <i>DefaultDependencies=no<\/i> is set in the specified units. Note that <i>Wants=<\/i> or <i>Requires=<\/i> must be defined in the target unit itself \u2014 if you for example define <i>Wants=<\/i>some.target in some.service, the automatic ordering will not be added.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 Target units automatically gain <i>Conflicts=<\/i> and <i>Before=<\/i> dependencies against shutdown.target.<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Example\u00a01.\u00a0Simple standalone target<\/b><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># emergency\u2212net.target<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">[Unit] <br \/> Description=Emergency Mode with Networking <br \/> Requires=emergency.target systemd\u2212networkd.service <br \/> After=emergency.target systemd\u2212networkd.service <br \/> AllowIsolate=yes<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When adding dependencies to other units, it&#8217;s important to check if they set <i>DefaultDependencies=<\/i>. Service units, unless they set <i>DefaultDependencies=no<\/i>, automatically get a dependency on sysinit.target. In this case, both emergency.target and systemd\u2212networkd.service have <i>DefaultDependencies=no<\/i>, so they are suitable for use in this target, and do not pull in sysinit.target.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You can now switch into this emergency mode by running <i>systemctl isolate emergency\u2212net.target<\/i> or by passing the option <i>systemd.unit=emergency\u2212net.target<\/i> on the kernel command line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Other units can have <i>WantedBy=emergency\u2212net.target<\/i> in the <i>[Install]<\/i> section. After they are enabled using <b>systemctl enable<\/b>, they will be started before <i>emergency\u2212net.target<\/i> is started. It is also possible to add arbitrary units as dependencies of emergency.target without modifying them by using <b>systemctl add\u2212wants<\/b>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd<\/b>(1), <b>systemctl<\/b>(1), <b>systemd.unit<\/b>(5), <b>systemd.special<\/b>(7), <b>systemd.directives<\/b>(7)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd.target \u2212 Target unit configuration <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,978],"class_list":["post-4392","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-systemd"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4392"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4392\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}