加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 钦州站长网 (https://www.0777zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

centos7 linux 重启网卡命令_centos8重启网卡命令

发布时间:2023-01-07 12:43:36 所属栏目:Linux 来源:
导读:  centos7 linux 重启网卡命令_centos8重启网卡命令1、centos6的网卡重启方法:servicenetworkrestartcentos7的网卡重启方法:systemctlrestartnetwork2、centos重启网口方法:关闭网卡口:ifdowneth0或ifconfiget
  centos7 linux 重启网卡命令_centos8重启网卡命令1、centos6的网卡重启方法:servicenetworkrestartcentos7的网卡重启方法:systemctlrestartnetwork2、centos重启网口方法:关闭网卡口:ifdowneth0或ifconfigeth0down启动网卡口:ifupeth0或ifconfigeth0up3、配置网卡ip增加ip:ifcfgeth0add192.1...

  大家好linux 重启,我是架构君,一个会写代码吟诗的架构师。今天说一说centos7 linux 重启网卡命令_centos8重启网卡命令,希望能够帮助大家进步!!!
 
  1、centos6的网卡重启方法:service network restart
 
  centos7的网卡重启方法:systemctl restart network
 
  2、centos重启网口方法:
 
  关闭网卡口:ifdown eth0 或 ifconfig eth0 down
 
  启动网卡口:ifup eth0 或 ifconfig eth0 up
 
  3、配置网卡ip
 
  增加ip:ifcfg eth0 add 192.168.1.251/24
 
  删除ip:ifcfg eth0 del 192.168.1.251/24 或 ifcfg eth0 stop
 
  4、DNS配置文件:cat /etc/resolv.conf
 
  5、关闭防火墙并设置开机不启动
 
  查看防火墙状态:systemctl status firewalld.service
 
  关闭:systemctl stop firewalld
 
  开启:systemctl start firewalld
 
  开机自动关闭:systemctl disable firewalld
 
  开机自动启动:systemctl enable firewalld
 
  查看开机是否启动:chkconfig --list|grep network(RHLE6)
 
  6、临时和永久关闭Selinux
 
  临时关闭:
 
  #getenforce
 
  Enforcing
 
  #setenforce 0
 
  setenforce:SELinux is disabled
 
  永久关闭:
 
  #vim /etc/selinux/config
 

(编辑:PHP编程网 - 钦州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!