When you enter the root folder, the default prompt for the echo \s-\v\$is displayed as bash-4.2#. I'm trying to play around with a bash prompt so that it displays the working directory.
export PS1="\w \$".
It is displayed correctly on the right, however, the character is \$not converted to #, although mine $UIDis 0, which leads to the victory in skipping the user's character \u. Is there anything extra that I have to add, or does this symbol not work if I export it?
dook source
share