1NM-ONLINE(1)                General Commands Manual               NM-ONLINE(1)
2
3
4

NAME

6       nm-online - ask NetworkManager whether the network is connected
7

SYNOPSIS

9       nm-online [OPTIONS...]
10

DESCRIPTION

12       nm-online is a utility to find out whether we are online. It is done by
13       asking NetworkManager about its status. When run, nm-online waits until
14       NetworkManager reports an active connection, or specified timeout
15       expires. On exit, the returned status code should be checked (see the
16       return codes below).
17
18       By default NetworkManager waits for IPv4 dynamic addressing to complete
19       but does not wait for the auto IPv6 dynamic addressing. To wait for
20       IPv6 addressing to complete, either (1) change the network connection's
21       IPv6 may-fail setting to no, and/or (2) change the IPv6 addressing
22       method to manual or dhcp, to indicate that IPv6 connectivity is
23       expected.
24

OPTIONS

26       -t | --timeout seconds
27           Time to wait for a connection, in seconds. If the option is not
28           provided, the default timeout is 30 seconds.
29
30       -x | --exit
31           Exit immediately if NetworkManager is not running or connecting.
32
33       -q | --quiet
34           Don't print anything.
35
36       -s | --wait-for-startup
37           Wait for NetworkManager startup to complete, rather than waiting
38           for network connectivity specifically. Startup is considered
39           complete once NetworkManager has activated (or attempted to
40           activate) every auto-activate connection which is available given
41           the current network state. (This is generally only useful at boot
42           time; after startup has completed, nm-online -s will just return
43           immediately, regardless of the current network state.)
44

EXIT STATUS

46       nm-online exits with status 0 if it succeeds, a value greater than 0 is
47       returned if an error occurs.
48
49       0
50           Success – already online or connection established within given
51           timeout.
52
53       1
54           Offline or not online within given timeout.
55
56       2
57           Unknown or unspecified error.
58

SEE ALSO

60       nmcli(1), NetworkManager(8).
61
62
63
64NetworkManager 1.14.0                                             NM-ONLINE(1)
Impressum