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