JAEN

Linux

hostnamectl

CautionShow/set hostname

hostnamectl

Shows hostname plus OS/kernel info. set-hostname changes it persistently on systemd systems.

Examples

  • hostnamectl set-hostname web01Set the hostname

Syntax

hostnamectl [set-hostname NAME]

Before you run it

Renaming can affect certs/cluster configs.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store