Saturday, 10 August 2013

Obtain the "pretty" hostname in bash

Obtain the "pretty" hostname in bash

On my Fedora 19 system, I am able to change the system hostname with
hostnamectl. This allows me to set several things, such as the static
(normal) hostname, as well as a "pretty" hostname.
Is there a simple command that retrieves the pretty hostname, from a bash
prompt?
hostname returns the static hostname, and the man page shows no options to
recover the pretty one.

No comments:

Post a Comment