hostnamectl
hostnamectl
# To show the current hostname:
hostnamectl
# To set the hostname to a static value:
hostnamectl set-hostname myhostname
# To set the hostname to a transient value:
hostnamectl set-hostname --transient myhostname
# To show the full hostname:
hostnamectl --full
# To show the domain name:
hostnamectl --domainhelp
breakdown
Last updated