linux也可以这样查看IP信息

 

[root@rac1 ~]# ip ad sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0c:29:00:f1:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.108.111/24 brd 192.168.108.255 scope global eth0
    inet6 fe80::20c:29ff:fe00:f17b/64 scope link
       valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0

 

 

你可能感兴趣的:(c,linux,UP)