[Shell] How to modify bash shell prompt
The UNIX shell displays a command prompt when the system is ready to accept commands on the command line. To customize your prompt you will need to modify the PS1 (“prompt string 1”) shell variable. For example if you want to show “user@host:working_path”, you have to set PS1 variable in this way in your .bash_profile:
# ~/.bash_profile: executed by bash(1) for login shells. PS1='[\u@\h:\w]$ 'Next digit source ~/.bash_profile and you’re ready.