文章目录
connect: network is unreachable
安装完Centos 7 虚拟机后,ping 外网时提示
connect: network is unreachable
解决方案:
1.定位到
/etc/sysconfig/network-scripts/ifcfg-enp0s3`文件
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
2.将最后一项
ONBOOT=no
改为
ONBOOT=yes
3.重启网络服务
service network restart
感谢
https://blog.csdn.net/qq_31382921/article/details/52174626
CentOS7:ifconfig command not found
在/sbin
目录下通过ls
查看是否有ifconfig
如果没有 , 安装 net-tools package
即可
yum install net-tools
感谢
https://blog.csdn.net/dandelion_drq/article/details/53503487
cp: omitting directory XXX
拷贝文件时报的异常信息,从http://blog.csdn.net/ldl22847/article/details/7731159
得到解决方案.
原因是 XXX目录下还有其他目录 , 不能直接拷贝 , 解决方案是:递归拷贝.
cp -r orginDir targetDir
-r
表示递归.
-bash: lsof: command not found
通过命令
# lsof -i:端口号
查看端口号占用情况时报的异常,原因是缺少lsof
包
yum安装命令
# yum install lsof -y
-bash: wget: command not found
安装wget即可
yum -y install wget