六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 24|回复: 0

linux常用命令

[复制链接]

升级  26.67%

22

主题

22

主题

22

主题

秀才

Rank: 2

积分
90
 楼主| 发表于 2013-1-17 02:52:50 | 显示全部楼层 |阅读模式
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的状态;
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表