To change the hostname on Ubuntu 23.10, follow these steps:
Step 1 : Start by checking the current hostname using the command:
Step 2 : Use the following command to set the new hostname (replace "server-01" with your desired hostname):
Step 3 : Verify the change by checking the updated hostname with:
Step 4 : Open the /etc/hosts
file to update the hostname:
Inside the file, locate the line with the old hostname and replace it with the new one.
Step 5 : Reboot your system to apply the changes:
Congratulations! You have successfully set or changed the hostname on your Ubuntu 23.10 system.