SYSTEMD-NETWORKD-WAIT-ONLINE@.SERVICE(8)

๐Ÿ’– NAME ๐Ÿ’–

bestie we're looking at SYSTEMD....SERVICE(8) โ€” aka the <pink>systemd-networkd-wait-online.service</pink> page ๐Ÿซถ and it covers three whole things:

  • systemd-networkd-wait-online.service
  • systemd-networkd-wait-online@.service
  • /usr/lib/systemd/systemd-networkd-wait-online

and what do they all do? they wait for network to come online. that's it. that's the job. ๐Ÿ’…


โœจ SYNOPSIS โœจ

systemd-networkd-wait-online.service

systemd-networkd-wait-online@.service

/usr/lib/systemd/systemd-networkd-wait-online

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so systemd-networkd-wait-online is a oneshot system service (peep systemd.service(5) for the lore on those) and it literally just sits there, patiently, waiting for the network to be configured. main character patience energy honestly. ๐Ÿง˜โ€โ™€๏ธ

By default it waits for all links it is aware of and which are managed by systemd-networkd.service(8) to be either fully configured or failed, and it waits for at least one link to be online. and what counts as "online" here? the link's operational state has to be equal or higher than degraded. that threshold is adjustable with the --operational-state= option if you're feeling picky. โœจ

The service systemd-networkd-wait-online.service invokes systemd-networkd-wait-online without any options at all โ€” no notes, no notes. so it waits for every managed interface to be configured or failed, and for at least one of them to be online.

The service systemd-networkd-wait-online@.service takes an interface name and invokes systemd-networkd-wait-online with -i plus that interface name. so it waits for that one specific interface to be configured and online. for example, systemd-networkd-wait-online@eth0.service waits for eth0 to be configured by systemd-networkd and online. obsessed with the specificity ngl. ๐ŸŽ€


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

here's everything it understands, bestie:

  • -i INTERFACE[:MIN_OPERSTATE[:MAX_OPERSTATE]], --interface=INTERFACE[:MIN_OPERSTATE[:MAX_OPERSTATE]] โ€” the network interface to wait for before deciding if the system is online. this is a lifesaver when a system has several interfaces that'll get configured, but there's one particular interface you need to reach some network resources. when you use it, all other interfaces get ignored. you can use this option more than once to wait for multiple network interfaces โ€” and when it's specified multiple times, systemd-networkd-wait-online waits for all of the specified interfaces to be online. optionally you can tack on required minimum and maximum operational states after a colon ":". check networkctl(1) for the possible operational states. if the operational state isn't specified here, then the value from RequiredForOnline= in the corresponding .network file is used if it's present, and "degraded" otherwise.
    • ๐Ÿ†• Added in version 213.
  • --ignore=INTERFACE โ€” network interfaces to be ignored when deciding if the system is online. by default, only the loopback interface is ignored. this option may be used more than once to ignore multiple network interfaces. ๐Ÿ™ˆ
    • ๐Ÿ†• Added in version 219.
  • -o MIN_OPERSTATE[:MAX_OPERSTATE], --operational-state=MIN_OPERSTATE[:MAX_OPERSTATE] โ€” takes a minimum operational state and an optional maximum operational state. peep networkctl(1) for the possible operational states. if set, this value overrides the RequiredForOnline= settings in .network files. but heads up โ€” it does not override operational states specified in the --interface= option. no cap. โš ๏ธ
    • ๐Ÿ†• Added in version 242.
  • -4, --ipv4 โ€” waits for an IPv4 address of each network interface to be configured. if you pair this with --any, then systemd-networkd-wait-online exits with success when at least one interface becomes online and has an IPv4 address. if the required minimum operational state is below "routable", then each link (or at least one link when using --any) must have an IPv4 link-local or routable address. if the required minimum operational state is "routable", then each link must have an IPv4 routable address.
    • if neither --ipv4 nor --ipv6 is specified, then the value from RequiredFamilyForOnline= in the corresponding .network file is used if it's present.
    • ๐Ÿ†• Added in version 249.
  • -6, --ipv6 โ€” waits for an IPv6 address of each network interface to be configured. if you pair this with --any, then systemd-networkd-wait-online exits with success when at least one interface becomes online and has an IPv6 address. if the required minimum operational state is below "routable", then each link (or at least one link when using --any) must have an IPv6 link-local or routable address. if the required minimum operational state is "routable", then each link must have an IPv6 routable address.
    • if neither --ipv4 nor --ipv6 is specified, then the value from RequiredFamilyForOnline= in the corresponding .network file is used if it's present.
    • ๐Ÿ†• Added in version 249.
  • --dns โ€” waits for DNS servers to be accessible on each interface. if you pair this with --any, then systemd-networkd-wait-online exits with success when at least one interface becomes online and has an accessible DNS server. ๐ŸŒˆ
    • if a link has the property DefaultRoute=yes (either because the DNSDefaultRoute= network property is explicitly configured, or because the link doesn't have any "routing-only" domains), or if the search domain "." is configured, then it waits for link-specific DNS servers to be accessible. otherwise, it allows global DNS servers to satisfy the condition.
    • ๐Ÿ†• Added in version 258.
  • --any โ€” even if several interfaces are stuck in a configuring state, systemd-networkd-wait-online exits with success as soon as at least one interface becomes online. when this is specified together with --interface=, then systemd-networkd-wait-online waits for one of the specified interfaces to be online. this is so useful when some interfaces just don't have carrier on boot. ๐Ÿ˜ญ
    • ๐Ÿ†• Added in version 242.
  • --timeout=SECS โ€” fails the service if the network isn't online by the time the timeout runs out. a timeout of 0 disables the timeout entirely. defaults to 120 seconds. โฐ
    • ๐Ÿ†• Added in version 219.
  • -q, --quiet โ€” suppresses log messages. shhh. ๐Ÿคซ
    • ๐Ÿ†• Added in version 242.
  • -h, --help โ€” prints a short help text and exits.
  • --version โ€” prints a short version string and exits.

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹


okay that's the whole page, bestie, you ate it up ๐Ÿ’… this one's from systemd 262.1, and it lives at SYSTEMD....SERVICE(8) โ€” go forth and wait for your network responsibly ๐ŸŽ€โœจ๐Ÿซถ

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms