Home >Operation and Maintenance >CentOS >What is the method to restart the network card in centos?

What is the method to restart the network card in centos?

藏色散人
藏色散人Original
2023-02-22 16:00:5117277browse

How to restart the network card in centos: 1. The network card restart command for centos6 is "service network restart"; 2. The network card restart command for centos7 is "systemctl restart network".

What is the method to restart the network card in centos?

The operating environment of this tutorial: CentOS 7 system, Dell G3 computer.

What is the method to restart the network card in centos?

1. How to restart the network card of centos6: service network restart

How to restart the network card of centos7: systemctl restart network

2. DNS configuration file: cat /etc/resolv.conf

Set host and IP binding information: cat /etc/hosts

Set the host name: cat /etc/hostname

3. You can use the nmtui text box to modify the IP

4. Turn off the firewall and set it not to start at boot

Check the firewall status:

systemctl status firewalld.service

Close:

systemctl stop firewalld

Open:

systemctl start firewalld

Automatically shut down at boot:

systemctl disable firewalld

Automatically start at boot:

systemctl enable firewalld

Check whether it starts at boot:

chkconfig --list|grep network(RHLE6)

5. Temporarily and permanently shut down Selinux

Temporarily Close:

_getenforce
Enforcing
_setenforce 0
setenforce:SELinux is disabled

Permanently closed:

_vim /etc/selinux/config

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What is the method to restart the network card in centos?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn