table of contents
NM-ONLINE(1) | General Commands Manual | NM-ONLINE(1) |
NAME¶
nm-online - ask NetworkManager whether the network is connected
SYNOPSIS¶
nm-online [OPTIONS...]
DESCRIPTION¶
nm-online is a utility to find out whether we are online. It is done by asking NetworkManager about its status. When run, nm-online waits until NetworkManager reports an active connection, or specified timeout expires. On exit, the returned status code should be checked (see the return codes below).
This tool is not very useful to call directly. It is however used by NetworkManager-wait-online.service with --wait-for-startup argument (see NetworkManager-wait-online.service(8)).
By default, connections have the ipv4.may-fail and ipv6.may-fail properties set to yes; this means that NetworkManager waits for one of the two address families to complete configuration before considering the connection activated. If you need a specific address family configured before network-online.target is reached, set the corresponding may-fail property to no.
OPTIONS¶
-h | --help
-q | --quiet
-s | --wait-for-startup
There are various ways to affect when startup complete is reached. For details see NetworkManager-wait-online.service(8).
-t | --timeout seconds
-x | --exit
EXIT STATUS¶
nm-online exits with status 0 if it succeeds, a value greater than 0 is returned if an error occurs.
0
1
2
SEE ALSO¶
nmcli(1), NetworkManager(8), NetworkManager-wait-online.service(8).
NetworkManager 1.50.0 |