`

linux常用命令

阅读更多

1. ifconfig: 查看网络接口.

ifconfig -a : 查看所有网络接口的情况

ifconfig eth0 :查看eth0 的状态

 

[root@localhost ~]# ifconfig eth0 down

[root@localhost ~]# ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0

[root@localhost ~]# ifconfig eth0 up 
[root@localhost ~]# ifconfig eth0 

 

注解: 

第一行:ifconfig eth0 down 表示如果eth0是激活的,就把它DOWN掉。此命令等同于 ifdown eth0;
第二行:用ifconfig 来配置 eth0的IP地址、广播地址和网络掩码;
第三行:用ifconfig eth0 up 来激活eth0 ; 此命令等同于 ifup eth0
第四行:用 ifconfig eth0 来查看 eth0的状态;

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics