Custom PS1 / Colorized Bash Prompt

This forum is for discussion about general software issues.

Custom PS1 / Colorized Bash Prompt

Postby cachedrive » Sat Sep 24, 2016 2:01 pm

Hello ALARM!

I need some help getting my bash PS1 prompt as follows:

Code: Select all
[carlos@alarm1 ~]$ cat .bashrc
export PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "


For whatever reason when I log out and log back in, I don't see my changes. My .bashrc is 644 and owned by carlos:users. Anyone know what I am doing wrong?

I searched #colorized prompt #custom ps1
cachedrive
 
Posts: 49
Joined: Fri Dec 26, 2014 5:07 pm

Re: Custom PS1 / Colorized Bash Prompt

Postby cachedrive » Mon Sep 26, 2016 12:40 pm

I changed the double quotes to single quotes / tics and it still doesn't render the file when I login as that user but if I do: source .bashrc, it immediately loads. Is there a way I can get this persistent at login?

Code: Select all
[carlos@alarm1 ~]$ source .bashrc
12:22:55-cmennens@dev1:~$ cat .bashrc
PS1='\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ '
export PS1


Do I need to muck with /etc/bash.bashrc?
cachedrive
 
Posts: 49
Joined: Fri Dec 26, 2014 5:07 pm

Re: Custom PS1 / Colorized Bash Prompt

Postby cachedrive » Mon Sep 26, 2016 1:07 pm

Self resolved. Reverted all changes and just edited the /etc/bash.bashrc entry for this and it works fine.
cachedrive
 
Posts: 49
Joined: Fri Dec 26, 2014 5:07 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests