I'm trying to set my PS1 prompt to
export PS1=" \w \u\[$(tput sgr0)\]"
\w \u\[$(tput sgr0)\]
Your shell is likely not
bash. Change it with
Also, there's a problem with part of the
PS1=" \w \u\[$(tput sgr0)\]"
$(...) will be evaluated when you set
PS1, but just that one time. If you would like to execute
tput sgr0 every time the prompt displays, use single quotes:
PS1='\w \u\[$(tput sgr0)\] \$ '
(I have also moved the initial space from the start to the end of the value and added
\$ which will make the prompt and command line more readable.
You could also set
PS1="\w \u \$ "
and then set
tput sgr0 execute before displaying every prompt (I don't know if it makes sense to do this as I don't quite know what it does, but the facility for it is there).
Notice that neither
PROMPT_COMMAND needs to be exported as it only makes sense to set them for the current shell session.