Home  >  Article  >  Operation and Maintenance  >  Example tutorial on modifying hostname in Centos system

Example tutorial on modifying hostname in Centos system

零下一度
零下一度Original
2017-06-25 10:04:591817browse

1. Use the command to temporarily modify

hostname oier

In this way, the hostname of the server will become oier, but it will change back after restarting

2. Edit the configuration The file is permanently modified

vi /etc/sysconfig/network

HOSTNAME=oier

It will not take effect until restarting

== =============================

Host analysis modification

Since the Host file will parse the Hostname to the local by default, if you need to do this, you need to modify the Host file at the same time

vi /etc/hosts

The above is the detailed content of Example tutorial on modifying hostname in Centos system. 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