1
2
|
$ hostnamectl
$ sudo hostnamectl set-hostname acer
|
1
|
$ 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”)
1
|
$ sudo hostnamectl set-hostname "lennarts-laptop" --static
|
The “static” hostname which is the user-configured hostname (e.g. “lennarts-laptop”)
1
|
$ 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.