访问手机版  

Linux常用命令|Linux培训学习|考试认证|工资待遇与招聘,认准超级网工!

招聘|合作 登陆|注册

网络工程师培训

当前位置:网络工程师 > 技术课程 > linux > 热点关注 > linux常用命令

【linux】ip命令

时间:2019-07-24

linux命令大全 关机_linux命令大全hds_linux命令大全

man page: show / manipulate routing,deviceslinux命令大全, policy routing and tunnels

格式:

ip [ OPTIONS ] OBJECT { COMMAND | help }

命令格式:

ip a # 或者 ip addr
ip -4 a # Only show TCP/IP IPv4
ip -6 a # Only show TCP/IP IPv6
#following only show etho info
ip a show eth0 
ip a list eth0
ip a show dev eth0
ip link ls up # Only show runing interfaces

示例:

[jiangjian@localhost shell]$ ip a #或者 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:17:4a:8d brd ff:ff:ff:ff:ff:ff
    inet 192.168.119.90/24 brd 192.168.119.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::f1fb:43f:7ada:57a4/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:ac:bd:ce 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:ac:bd:ce brd ff:ff:ff:ff:ff:ff
[jiangjian@localhost shell]$ 
 上一个教程:linux脚本加入延时等待