hostname

Installation
SKILL.md

hostname - System Hostname Management

The hostname module provides straightforward subcommands to retrieve or update the system's hostname, supporting both long and short formats.

When to Activate

  • When identifying the system name for scripts or documentation.
  • When changing the system's identity (requires elevated privileges).

Core Principles & Rules

  • Formats: Support for --long (FQDN) and --short formats.
  • Permissions: Changing the hostname with set requires sudo privileges.

Patterns & Examples

View Hostname

# Display the full system hostname
x hostname
# Display only the short hostname
x hostname --short

Set Hostname

# Change the system hostname to a new value
x hostname set my-new-server

Checklist

  • Confirm if the long or short format is needed.
  • Ensure the user has the required permissions if setting a new name.
Related skills

More from x-cmd/skill

Installs
3
Repository
x-cmd/skill
GitHub Stars
20
First Seen
Apr 10, 2026