nm-online

Ask NetworkManager whether the network is connected. More information: <https://networkmanager.dev/docs/api/latest/nm-online.html>.

Debian Debian
RUN apt-get update && \ apt-get install -y network-manager
Ubuntu
RUN apt-get update && \ apt-get install -y network-manager
Alpine
RUN apk add networkmanager
Arch Arch Linux
RUN pacman -S --noconfirm networkmanager
image/svg+xml Kali Linux
RUN apt-get update && \ apt-get install -y network-manager
Fedora
RUN dnf install -y NetworkManager-1
Raspbian
RUN apt-get update && \ apt-get install -y network-manager
click the source code to copy install nm-online on any operating system with command-not-found.com