How do I change the local hostname in Linux?

How do I change the local hostname in Linux?
Answer
Changing the Hostname
To change the hostname invoke the hostnamectl command with the set-hostname argument followed by the new hostname. Only the root or a user with sudo privileges can change the system hostname. The hostnamectl command does not produce output.
 

Tìm kiếm

Back
Top