码迷,mamicode.com
首页 > 其他好文 > 详细

centos 查看IP

时间:2019-08-14 13:01:00      阅读:492      评论:0      收藏:0      [点我收藏+]

标签:div   forever   host   rri   multi   adc   style   命名   ack   

[root@centosnet ~]# man ip
[root@centosnet ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:d3:10:be brd ff:ff:ff:ff:ff:ff
    inet 192.168.8.123/24 brd 192.168.8.255 scope global noprefixroute dynamic ens33
       valid_lft 85800sec preferred_lft 85800sec
    inet6 fe80::c595:c345:cd87:8a5c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:31:dd:3a brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:31:dd:3a brd ff:ff:ff:ff:ff:ff
[root@centosnet ~]# clear

[root@centosnet ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:d3:10:be brd ff:ff:ff:ff:ff:ff
    inet 192.168.8.123/24 brd 192.168.8.255 scope global noprefixroute dynamic ens33
       valid_lft 85735sec preferred_lft 85735sec
    inet6 fe80::c595:c345:cd87:8a5c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:31:dd:3a brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:31:dd:3a brd ff:ff:ff:ff:ff:ff
[root@centosnet ~]# 

 然后我们输入ip查询命名 ip addr  也可以输入 ifconfig查看ip,但此命令会出现3个条目,centos的ip地址是ens33条目中的inet值。

centos 查看IP

标签:div   forever   host   rri   multi   adc   style   命名   ack   

原文地址:https://www.cnblogs.com/Jeely/p/11351101.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!