Configuring a Console Prompt for BASH Linux

In BASH it’s pretty simple to customize the console prompt. There are a few good reasons for doing this, for instance if you are pulling out data from the commandline or running automation tasks and want to know when each section was executed. Here is how I did it:

Edit .bash_profile

vi .bash_profile

Insert this line into .bash_profile

PS1='bash-\v \d \t \H \w\$ '

source it

$source .bash_profile
bash-4.9 Tue Nov 24 11:32:09 pirax-test ~#