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

EXIT STATUS

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

SEE ALSO

63       nmcli(1), NetworkManager(8).
64
65
66
67NetworkManager 1.20.8                                             NM-ONLINE(1)
Impressum