Featured
Set server hostname
Set a descriptive hostname for the server to make logs and prompts clearer.
Sets both the transient and static hostname so the server identifies itself correctly in logs, prompts, and network broadcasts. Also updates /etc/hosts to prevent sudo warnings.
When you need this: When provisioning a new server or renaming an existing one.
Variables
Lowercase letters, digits, and hyphens only. No dots.
Command
2 views
0 copies
Related in this category
Log in to save
Free account — save snippets into your own collections.