今天突然无法连接虚拟机了,报Error, some other host already uses address错误,换了其他ip还是报这样的错误,还好网上一搜就找到了解决办法 方法如下:
1、vim /etc/sysconfig/network-scripts/ifup-eth 修改配置文件
2、把这个ip判断注释掉 可以通过 /arping快速定位
3、保存退出 重新启动网卡
service network restart
(备注:使用sed功能查找
数据的搜寻并显示
搜索 /etc/passwd有root关键字的行
nl /etc/passwd | sed '/root/p' 1 root:x:0:0:root:/root:/bin/bash 1 root:x:0:0:root:/root:/bin/bash 2 daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 bin:x:2:2:bin:/bin:/bin/sh 4 sys:x:3:3:sys:/dev:/bin/sh 5 sync:x:4:65534:sync:/bin:/bin/sync ....下面忽略
如果root找到,除了输出所有行,还会输出匹配行。
使用-n的时候将只打印包含模板的行。
nl /etc/passwd | sed -n '/root/p' 1 root:x:0:0:root:/root:/bin/bash
#nl ifup-eth | sed -n '/arping/p' 216行 实测245行 WFTW)