Configure hostname

hostnamectl

$ hostnamectl
$ sudo hostnamectl set-hostname acer
$ sudo hostnamectl set-hostname "Lennart's Laptop" --pretty

The high-level “pretty” hostname which might include all kinds of special characters (e.g. “Lennart’s Laptop”)

$ sudo hostnamectl set-hostname "lennarts-laptop" --static 

The “static” hostname which is the user-configured hostname (e.g. “lennarts-laptop”)

$ sudo hostnamectl set-hostname "node12345678" --transient

The transient hostname which is a fallback value received from network configuration (e.g. “node12345678”). If a static hostname is set to a valid value, then the transient hostname is not used.

comments powered by Disqus