commands.sh

nm-online

linux

Ask NetworkManager whether the network is connected.

More info →

Examples (2)

Find out whether the network is connected and print the result to `stdout`

Wait `n` seconds for a connection (30 by default)

nm-online --timeout n
made by @shridhargupta | data from tldr-pages