Steps to modify the original Linux hostname

  

Execute the command hostname, modify the current system hostname
# hostname newhost

Modify /etc/sysconfig/network so that the next time you start, use the new one. Hostname

hostname=newhost

Modify /etc/hosts. If you don't modify it, apache and other services that need to resolve the host name will not start.

127.0.0.1 newhost localhost

The last is that the host name in the command prompt has not changed, if you care. Just log in again.

Copyright © Windows knowledge All Rights Reserved