How do I change the hostname in Ubuntu 18?

Duyên Trương

New member
How do I change the hostname in Ubuntu 18?
Answer
Change the Hostname
  • Change the hostname using hostnamectl . In Ubuntu 18.04 we can change the system hostname and related settings using the command hostnamectl .
  • Edit the /etc/hosts file. Open the /etc/hosts file and change the old hostname to the new one.
  • Edit the cloud.cfg file.
 

Tìm kiếm

Back
Top