Step 1: The ubuntu host name is located in the /etc/hostname file, modify it to the name you need. Step 2: Modify the /etc/hosts file and change the host name corresponding to 127.0.1.1 to a new host name that is consistent with the host name in /etc/hostname. Step 3: Restart the system.
Reference article: Modify host name in ubuntu
Step 1: The ubuntu host name is located in the /etc/hostname file, modify it to the name you need.
Step 2: Modify the /etc/hosts file and change the host name corresponding to 127.0.1.1 to a new host name that is consistent with the host name in /etc/hostname.
Step 3: Restart the system.