Avatar of mac_g
mac_g
Flag for Saudi Arabia

asked on 

Linux : How to Customize PS1 variable , Bash Colors and Content in Linux Terminal Prompt


my env PS1 values settings done as follows .. 

export PS1='$(whoami)@$(hostname):$(pwd) '$

Working good as per my requirement.

I need help for a little customization as below
--
1) should leave one white space after $

currently --
  admin@172.17.49.30:/home/admin/test/test $pwd
want to be ----
  admin@172.17.49.30:/home/admin/test/test $ pwd

2)
want to set one color coding scheme for this PS1 part- (whoami)@$(hostname)
another color code for  other part --$(pwd)


3) All the PS1 value to be displayed as BOLD

please advice how to achieve it, please advise


LinuxUnix OSLinux DistributionsMiscellaneousWindows OS

Avatar of undefined
Last Comment
arnold

8/22/2022 - Mon