快捷导航

云服务器Centos7 重启网卡命令

[复制链接]
查看: 104|回复: 0
发表于 2023-6-29 15:28:47 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

精彩推荐

尚云驿站

  • 投诉建议:350467567@qq.com
  • 软文投稿:350467567@qq.com
  • 友情链接:350467567@qq.com

云服务支持

精彩文章,快速检索

Copyright 尚云驿站  Powered by©  技术支持:飛    ( 闽ICP备2025116718号-15 )