[Clfs-support] What is the correct location for PS1 environment variable?

Israr Sayed sd.israr at gmail.com
Mon Oct 28 01:09:47 PDT 2019


I am following Cross Linux From Scratch - Embedded .In [3.3. Setting Up the Environment], PS1 is declared in .bash_profile file.Practically it is never come up in Terminal.

When i login as su - clfs, both .bash_profile and .bashrc files gets executed.When i login as su clfs only .bashrc file gets executed.

In both cases PS1 never updated in Terminal.

When i put PS1 in .bashrc file, it get updated.

CLFS book has putted it in .bash_profile file, like:
---
cat > ~/.bash_profile << "EOF"
exec env -i HOME=${HOME} TERM=${TERM} PS1='\u:\w\$ ' /bin/bash
EOF
---
So what is the suitable location for PS1?



More information about the Clfs-support mailing list