0

I'm trying to set colors within my .bashrc. I would like my background to be black, bash prompt text to be white and input text to be lime green. I have this so far:

export PS1="[\e[1;37;40m[\u@\W]\$ "

however I am unable to change my input text to lime green.

0

It really looks best if you set your terminal to green foreground and black background and don't modify the prompt to a green foreground color. I don't know the color code for lime green, so I used green.

# terminal with green foreground, black background
# no need to set green foreground/background color
export PS1="\e[1;37m[\u@\W]\$ \e[0m"

# terminal with white foreground, black background
#            or black foreground, white background
export PS1="\e[1;37;40m[\u@\W]\$\e[0;32m "

Used codes:

  • \e[1m bold
  • \e[32m green foreground
  • \e[37m white foreground
  • \e[40m black background
  • \e[0m end sequence

You can also try \e[92m light green...

bash color prompt

| improve this answer | |

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.