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.servicesystemd-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-onlinewaits for all of the specified interfaces to be online. optionally you can tack on required minimum and maximum operational states after a colon":". checknetworkctl(1)for the possible operational states. if the operational state isn't specified here, then the value fromRequiredForOnline=in the corresponding.networkfile 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. peepnetworkctl(1)for the possible operational states. if set, this value overrides theRequiredForOnline=settings in.networkfiles. 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, thensystemd-networkd-wait-onlineexits 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
--ipv4nor--ipv6is specified, then the value fromRequiredFamilyForOnline=in the corresponding.networkfile is used if it's present. - ๐ Added in version 249.
- if neither
-6,--ipv6โ waits for an IPv6 address of each network interface to be configured. if you pair this with--any, thensystemd-networkd-wait-onlineexits 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
--ipv4nor--ipv6is specified, then the value fromRequiredFamilyForOnline=in the corresponding.networkfile is used if it's present. - ๐ Added in version 249.
- if neither
--dnsโ waits for DNS servers to be accessible on each interface. if you pair this with--any, thensystemd-networkd-wait-onlineexits 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 theDNSDefaultRoute=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.
- if a link has the property
--anyโ even if several interfaces are stuck in a configuring state,systemd-networkd-wait-onlineexits with success as soon as at least one interface becomes online. when this is specified together with--interface=, thensystemd-networkd-wait-onlinewaits 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 of0disables the timeout entirely. defaults to120seconds. โฐ- ๐ 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