0
点赞
收藏
分享

微信扫一扫

Linux-网络配置文件

魔都魅影梅杜萨 2022-02-06 阅读 55
linux

编辑网络配置文件

vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.4.10
GATEWAY=192.168.4.2
NETMASK=255.255.255.0
DNS1=223.5.5.5
DNS2=223.6.6.6

重启网络

systemctl restart network

关闭防火墙和selinux:

systemctl status firewalld.service #查看状态
systemctl stop firewalld。service
systemctl disable firewalld。service
vim /etc/selinux/config
#:set nu显示序列号
#修改第七行,永久关闭selinux
SELINUX=disabled

重启虚拟机生效

reboot
举报

相关推荐

0 条评论