Linux的IP地址显示127.0.0.1的解决办法

首先查看Linux的防火墙是否关闭

firewall-cmd


Linux上新用的防火墙软件,跟iptables差不多的工具。

firewall-cmd --state # 显示防火墙状态

systemctl start  firewalld # 启动

systemctl status firewalld # 或者 firewall-cmd --state 查看状态

systemctl disable firewalld # 停止

systemctl stop firewalld  # 禁用

详细命令查看:https://blog.csdn.net/GMingZhou/article/details/78090963

然后修改网络配置

输入命令
vi /etc/sysconfig/network-scripts/ifcfg-ens33

修改ONBOOT属性值的no改为yes

这里写图片描述

重启服务

service network restart(重启服务命令)

ip addr show(查看ip信息命令)

猜你喜欢

转载自www.cnblogs.com/nhdlb/p/11010438.html