Home >Operation and Maintenance >CentOS >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
Enter the command ls -l to view all file lists and find the ifcfg-ens33 configuration file
Enter the command vi ifcfg -ens33 to edit the network card file
In the ifcfg-ens33 configuration file, add the external network IP, subnet mask and gateway configuration, save and exit
Enter the command vi /etc/resolv.conf Edit dns, add the dns address 114.144.114.114, save and exit
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
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!