shell prompt string
Bash has five prompt strings that can be customized:
PS0is displayed after each command, before any output.PS1is the primary prompt which is displayed before each command, thus it is the one most people customize.PS2is the secondary prompt displayed when a command needs more input (e.g. a multi-line command).PS3is not very commonly used. It is the prompt displayed for Bash’sselectbuilt-in which displays interactive menus. Unlike the other prompts, it does not expand Bash escape sequences. Usually you would customize it in the script where theselectis used rather than in your.bashrc.PS4is also not commonly used. It is displayed when debugging bash scripts to indicate levels of indirection. The first character is repeated to indicate deeper levels.
来源:https://wiki.archlinux.org/title/Bash/Prompt_customization