thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Foundational

hostnamectl

A systemd utility that views and sets the system hostname and related host metadata.

Definition

hostnamectl set-hostname writes the static hostname to /etc/hostname and applies it immediately. It also reports OS, kernel, architecture and virtualization type.

Example

hostnamectl set-hostname web01.corp.local renames the server persistently.

Exam tip

hostnamectl changes are persistent, unlike the plain hostname command.

Related terms