Why is the variable containing the shell prompt called PS1 ?
Where does it come from ?

Does there exist PS2, PS3, etc ... ?


The PS used in variable names PSn comes from the term 'Prompt Statement'.

And yes, PS2 & PS3 also exists along with PS4.

A very well written articles is available on this topic at: http://www.thegeekstuff.com/2008/09/bash-shell-take-control-of-ps1-ps2-ps3-ps4-and-prompt_command/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.