Example tutorial on modifying hostname in Centos system

零下一度
Release: 2017-06-25 10:04:59
Original
1863 people have browsed it

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!

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
Popular Tutorials
More>
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!