Ubuntu16.04之後的網路裝置資訊
顯示IPv4/IPv6 IP,DNS,Gateway等全部資訊
$ nmcli device show
GENERAL.DEVICE: enp0s31f6
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 34:97:F6:83:84:EC
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: intra-yhchiu(Wired-enp0s31f6)
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/3
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 10.131.2.183/20
IP4.GATEWAY:
IP4.ROUTE[1]: dst = 224.0.0.0/4, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]: dst = 172.16.0.0/12, nh = 10.131.3.254, mt = 100
IP6.ADDRESS[1]: fe80::3697:f6ff:fe83:84ec/64
IP6.GATEWAY:
GENERAL.DEVICE: enp4s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 34:97:F6:83:84:EB
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: INETERNET(Wired-enp4s0)
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/4
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.16.11/24
IP4.GATEWAY: 192.168.16.254
IP4.ROUTE[1]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]: 8.8.8.8
IP4.DNS[2]: 168.95.192.1
IP4.DNS[3]: 8.8.4.4
IP4.DNS[4]: 168.95.1.1
IP6.ADDRESS[1]: 2002:7a74:268d:0:3697:f6ff:fe83:84eb/64
IP6.ADDRESS[2]: fe80::3697:f6ff:fe83:84eb/64
IP6.GATEWAY: fe80::3e37:86ff:fe93:a955
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY:
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY:
僅顯示特定裝置
$ nmcli device show {裝置名稱}
留言