Change the Hostname in Ubuntu

This document tells how to change the hostname (computer name) in ubuntu.

1. Edit the hostname file. You can use any editor to change the content of the hostname file.

2. User hostaname¬†command to set system’s host name.

3. Edit dhcpcd file if it exists.

4. Edit /etc/hosts. 
The value you assign as your system’s FQDN should have an “A” record in DNS pointing your hosts’s IPv4 address

5. Restart networking service

6. Test. Use the following commands to check the results

 

Leave a Reply

Your email address will not be published. Required fields are marked *