开发者

Debian prompt takes variables in PS1 literally

开发者 https://www.devze.com 2023-03-28 10:00 出处:网络
I have a small problem with the prompt on a debian server, I keep getting the variables as literals: PS1=\'\\u \\w $\'

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

    PS1='\u \w $'
开发者_如何学JAVA

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消