My current ubuntu prompt is set as something like
athos@myT460pLaptopBoughtAt2016 ~$ echo $PS1
[\u@\h \W]\$
, where h
means Static hostname
, as seen, it's quite long.
On the other side, I've set the Pretty hostname
:
~$ hostnamectl
Static hostname: myT460pLaptopBoughtAt2016
Pretty hostname: T460p
...
Is there a way to refer to the Pretty hostname
instead of the Static hostname
in prompt?