怎样查看Linux本机IP地址

2022年12月6日 | 分类: 【技术】

参考:https://blog.csdn.net/topgun_chenlingyun/article/details/8073651

输入:

ip address

输出:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    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 state UP qlen 1000
    link/ether 00:0c:29:45:63:ba brd ff:ff:ff:ff:ff:ff
    inet 192.168.128.132/24 brd 192.168.128.255 scope global eth0
    inet6 fe80::20c:29ff:fe45:63ba/64 scope link 
       valid_lft forever preferred_lft forever