hostnamectl: add --pretty and --static examples (#5203)

translation-badges
Laurent Indermühle 2021-01-30 22:00:35 +01:00 committed by GitHub
parent 0a3af1b152
commit 7c6dfb6d55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -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 ""`