System Grab Bag

View all TLDR pages from Linux (or from all pages)

nm-online

Ask NetworkManager whether the network is connected. More information: https://networkmanager.dev/docs/api/latest/nm-online.html.
  • Find out whether the network is connected and print the result to stdout:
    nm-online
  • Wait n seconds for a connection (30 by default):
    nm-online --timeout {{n}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.