문제

I have a small problem with the prompt on a debian server, I keep getting the variables as literals:

    PS1='\u \w $'

gives me a prompt showing:

    \u \w $

where it should imho show:

    username dirname $

What am I missing here?

도움이 되었습니까?

해결책

Are you sure your shell is bash ? With other shells (such as dash), such variables may not work.

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