Change
Linux
Method of server host name or machine name IP The host name or machine name can be dynamically changed using the command hostname, or the hostname environment variable in/etc/sysconfig/Network/can be changed permanently.
You can also run the RedHat-config-network command and click the "DNS" page to change the "hostname" item.
If Samba is running, you want to change the system's NetBIOS name so that it is not the same as the IP host name. You can modify/etc/samba/smb. add a line to the conf file: NetBIOS name = <server name:>. Here, <server name:> is the name of your machine displayed on Windows. Most people use the Host Name of the system.
In the following example, the host name is changed from jaws to peahi in the command line. Note: If you only run the hostname command, the current host name is displayed.
# Hostname
Jaws.example.com
# Hostname peahi.example.com
# Hostname
Peahi.example.com
In the following example, modify the/etc/sysconfig/network file and change the host name from jaws to peahi. Use your favorite editor to make such changes.
# Cat/etc/sysconfig/Network
Networking = Yes
Hostname = jaws.example.com
# Cat/etc/sysconfig/Network
Networking = Yes
Hostname = peahi.example.com
Bu wzwind
You also need to modify the/etc/hosts file. Otherwise, software such as subversion may fail to obtain the local IP address.