Centos7 网卡重启命令

Centos7 网卡重启命令

1、

centos6的网卡重启方法:service network restart
centos7的网卡重启方法:systemctl restart network
2、

DNS配置文件:cat /etc/resolv.conf
设置主机和IP绑定信息:cat /etc/hosts
设置主机名:cat /etc/hostname
3、

可以使用nmtui文本框方式修改IP
4、

关闭防火墙并设置开机不启动
查看防火墙状态:systemctl status firewalld.service
关闭:systemctl stop firewalld
开启:systemctl start firewalld
开机自动关闭:systemctl disable firewalld
开机自动启动:systemctl enable firewalld
查看开机是否启动:chkconfig –list|grep network(RHLE6)
5、

临时和永久关闭Selinux
临时关闭:
_getenforce
Enforcing
_setenforce 0
setenforce:SELinux is disabled
永久关闭:
_vim /etc/selinux/config

除非注明,否则均为 曼诺 原创文章,转载请注明出处:https://www.wamano.com/2025/4368.html

(0)
打赏 微信 扫一扫 微信 扫一扫 支付宝 扫一扫 支付宝 扫一扫
Mano的头像Mano
上一篇 4天前
下一篇 4天前

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

联系我们

400-800-8888

在线咨询: QQ交谈邮件:admin@example.com工作时间:周一至周五,9:30-18:30,节假日休息

关注微信