문제

My $PS1 in Bash is set to:

\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]

But is showing up like:

Jesse at unknown2837371d98a2 in ~

Why is my hostname (\h) showing up as unknown?

도움이 되었습니까?

해결책

The problem is that you have such hostname. Please check it using hostname.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top