Home >Operation and Maintenance >CentOS >How can centos access the external network?

How can centos access the external network?

王林
王林Original
2020-04-03 15:06:346325browse

How can centos access the external network?

How to configure centos7.5 to access the external network:

Enter the command cd /etc/sysconfig/network-scripts and enter the path where the network card configuration file is located

How can centos access the external network?

Enter the command ls -l to view all file lists and find the ifcfg-ens33 configuration file

How can centos access the external network?

Enter the command vi ifcfg -ens33 to edit the network card file

How can centos access the external network?

In the ifcfg-ens33 configuration file, add the external network IP, subnet mask and gateway configuration, save and exit

How can centos access the external network?

Enter the command vi /etc/resolv.conf Edit dns, add the dns address 114.144.114.114, save and exit

How can centos access the external network?

Execute the command to restart the network

systemctl restart network

Execute the command ping Baidu domain name. If it can ping successfully, it means the network configuration is successful

How can centos access the external network?

Recommended related tutorials: centos tutorial

The above is the detailed content of How can centos access the external network?. 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