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

藏色散人
Release: 2023-02-22 16:00:51
Original
16986 people have browsed it

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
Copy after login

Close:

systemctl stop firewalld
Copy after login

Open:

systemctl start firewalld
Copy after login

Automatically shut down at boot:

systemctl disable firewalld
Copy after login

Automatically start at boot:

systemctl enable firewalld
Copy after login

Check whether it starts at boot:

chkconfig --list|grep network(RHLE6)
Copy after login

5. Temporarily and permanently shut down Selinux

Temporarily Close:

_getenforce Enforcing _setenforce 0 setenforce:SELinux is disabled
Copy after login

Permanently closed:

_vim /etc/selinux/config
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!