If we normally use the Vultr VPS host, the default Hostname does not need to be modified when we open it. In fact, most service providers are like this. However, if we have some installed software environments, including some post office services, we need to set the Hostname hostname.
What if we need to modify the Vultr Hostname hostname? For example, we can also refer to Lao Zuo's《 How to permanently modify the AliCloud Linux VPS host user name 》The method mentioned in the article, however, is really complicated.
After changing the Hostname, we'd better restart the server and check whether the update has been completed when logging in to SSH. If you reinstall the system, this setting will fail.
However, you should pay attention to the setting of changing the host name. Because whether we have seen:
WARNING
Reinstalling the operating system will WIPE ALL THE DATA on your server.
Such prompt? Yes, if you use this method to reset the host name, the server will be reset. So this must be used with caution. In particular, do not set the host name like this in the existing installation environment of our server. We can deploy no data at the time of new installation. We can use this method. They will reinstall the system with our customized host name.
If our server already has data, what can we do to change the hostname correctly? For example, we need to set a new hostname: newtricks
sudo hostnamectl set-hostname newtricks
You also need to edit the:/etc/hosts file.
sudo nano /etc/hosts
For example, it was
127.0.0.1 olddog
::1 olddog
We need to modify it to:
127.0.0.1 newtricks newtricks.example.com
::1 newtricks newtricks.example.com
Then we restart the server to check whether the settings are complete.
In conclusion, it can be seen that the setting of Hostname in the VULTR panel is a bit unreliable. If someone clicks wrong, wouldn't it be troublesome?
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge