Home  >  Article  >  Operation and Maintenance  >  How to modify hosts under centos

How to modify hosts under centos

王林
王林Original
2020-05-23 09:31:343057browse

How to modify hosts under centos

First open the /etc/hosts file

vim /etc/hosts

Then add the rules we need to set in the /etc/hosts file, for example:

How to modify hosts under centos

After the modification is completed, restart the network to take effect

/etc/init.d/network restart

Recommended tutorial: centos tutorial

The above is the detailed content of How to modify hosts under 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