commands
hostnamectl — Inspect system hostname
status reports hostname information through systemd-hostnamed; hostname changes require authorization and can affect services. Does not register DNS automatically. Use a fresh private workspace; live operations are VM-only.
Formal Syntax & Structure
linux syntaxlinux
hostnamectl [COMMAND]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| COMMAND | operand | Read-only status |
Return Value
exit status and output
status reports hostname information through systemd-hostnamed; hostname changes require authorization and can affect services. Does not register DNS automatically.
Working Example
Example Snippetlinux
hostnamectl status