So I tried to change the output of my terminal prompt but when I try something like /W it just puts the /W not the path. For example export PS1="/W $ "turns my prompt into "/W $"

2 Answers 2


It needs to be \W, with a backslash.


That should be a backslash, not a slash: \W.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .