Wake up in the morning find the Linux hostname changed to Bogon
Bogon refers to addresses that should not appear in the Internet routing table.
These addresses should include:
1, private address such as 10,172.16-32,192.168 .....
2. Address not officially assigned
After Google found a way to change the name
One: Using the hostname command
[Email protected] ~]# hostname yourname
This only changes the host name temporarily.
Two: Modify the Linux host configuration files/etc/sysconfig/network and/etc/hosts
1. Modify the host name inside the/etc/sysconfig/network.
# vi/etc/sysconfig/network
Networking=yes
Hostname=yourname//Modify HOSTNAME in this
gateway=192.168.1.1//Your IP address
2. Modify the name inside the/etc/hosts
# vi/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.121 yourname//In this change hostname//Your IP address
Sometimes this is the only line.
127.0.0.1 yourname localhost.localdomain localhost
3. Make the name of the change effective without restarting the machine
# hostname Yourname
# su
Solve the problem of hostname changing Bogon under Linux