1. Temporarily modify host name
Hostname Host Name
Reconnect the shell, you can, in this way, can only modify the temporary host name, when the machine restarts, the host name has been changed back.
2. Permanently modify the host name
Hostnamectl Set-hostname
Reconnect the shell, use this way to modify, you can permanently modify the host name!
If you think reading this blog gives you something to gain, you might want to click " recommend " in the lower right corner.
If you want to find my new blog more easily, click on " Follow me " in the lower left corner.
If you are interested in what my blog is talking about, please keep following my follow-up blog, I am " Liu Chao ★ljc".
This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.
CentOS 7.2 Modify Host Name