From 7c6dfb6d55667fd5d556c13e6afd465986978ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Inderm=C3=BChle?= Date: Sat, 30 Jan 2021 22:00:35 +0100 Subject: [PATCH] hostnamectl: add --pretty and --static examples (#5203) --- pages/linux/hostnamectl.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/linux/hostnamectl.md b/pages/linux/hostnamectl.md index de77a762ea..4ddb5b73a4 100644 --- a/pages/linux/hostnamectl.md +++ b/pages/linux/hostnamectl.md @@ -8,4 +8,12 @@ - Set the hostname of the computer: -`sudo hostnamectl set-hostname "{{some_hostname}}"` +`sudo hostnamectl set-hostname "{{hostname}}"` + +- Set a pretty hostname for the computer: + +`sudo hostnamectl set-hostname --static "{{hostname.example.com}}" && sudo hostnamectl set-hostname --pretty "{{hostname}}"` + +- Reset hostname to its default value: + +`sudo hostnamectl set-hostname --pretty ""`