Sugiro nmcli
( página de manual ).
Já está instalado no Ubuntu.
Exemplo de saída
tim@Hairy14:~$ nmcli -p c
======================================================================================================================
Connection list
======================================================================================================================
NAME UUID TYPE TIMESTAMP-REAL
----------------------------------------------------------------------------------------------------------------------
Tim's Phone Network 39bdb4e5-bce2-498e-ba2f-326e9601ea21 bluetooth never
Hotspot e9d19b97-a01e-4017-9f64-3f663f5a025b 802-11-wireless Mon 28 Jul 2014 10:56:02 BST
Tim's Phone Network e0f716d4-c84f-4cd0-8ff6-140471583bea bluetooth never
Wired Connection RIP 516797eb-78cf-4930-9d3a-b0be1b861f42 802-3-ethernet Wed 23 Jul 2014 12:01:28 BST
Wired connection SIP 57816f79-049b-4ecc-806c-c48278845fc2 802-3-ethernet Wed 30 Jul 2014 16:52:14 BST
Opções:
tim@Hairy14:~$ nmcli
Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }
OPTIONS
-t[erse] terse output
-p[retty] pretty output
-m[ode] tabular|multiline output mode
-f[ields] <field1,field2,...>|all|common specify fields to output
-e[scape] yes|no escape columns separators in values
-n[ocheck] do not check nmcli and NetworkManager versions
-v[ersion] show program version
-h[elp] print this help
OBJECT
nm NetworkManager's status
c[onnection] NetworkManager's connections
d[evice] devices managed by NetworkManager
tim@Hairy14:~$ nmcli -p
Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }
OPTIONS
-t[erse] terse output
-p[retty] pretty output
-m[ode] tabular|multiline output mode
-f[ields] <field1,field2,...>|all|common specify fields to output
-e[scape] yes|no escape columns separators in values
-n[ocheck] do not check nmcli and NetworkManager versions
-v[ersion] show program version
-h[elp] print this help
OBJECT
nm NetworkManager's status
c[onnection] NetworkManager's connections
d[evice] devices managed by NetworkManager
Então, para exibir o status de nm:
nmcli -p nm