在Linux上检查ip中的几个命令,并根据需要进行备份。 以下具体介绍。ifconfig
Linux用于显示IP地址的命令--ifconfig
ifconfig命令用于查看和修改网络接口的地址和参数
$ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 net掩码ff 000000
hme0: flags=863 mtu 1500
inet 211.101.149.11 net mask ffff 00 broadcast 211.101.149.255
ether 8:03360203360 a 7:4 d :21
网络接口的名称、接口状态(up or down )、
接口的IP地址和掩码等信息
33558 www.Sina.com/# ifconfig hm E0 down
# ifconfig hme 0211.101.149.233 net mask 255.255.255.0 up
首先,使用down命令参数暂停网络接口hme0的服务,然后在Linux上输入ip的ifconfig命令
接口将分配新的IP地址和掩码,然后启动网络接口服务
也可以通过更改文件/etc/hosts的IP地址值并重新启动系统来更改计算机的IP地址。
/etc/hosts/:211.101.149.11 samp dt
更改网络接口的IP地址:
已更改网卡/添加网卡,但系统无法自动启动此接口服务。 在这种情况下,需要手动创建网络端口服务:
#ifconfig hme0 plumb
Linux可以看到ip并创建接口le0的网络服务
因此,ifconfig和unplumb参数允许您停止服务并关闭网络。
netconfig用于设置IP地址