the issue of environment value $PS1 set under Ubuntu 10.04

Bruce Dubbs bruce.dubbs at
Sun Jun 6 09:55:44 PDT 2010

littlebat wrote:
>> Try adding "--noprofile --rc ~lfs/.bashrc" to the bash command. Or
>> just
> Ubuntu bash has a bug, even if I specified --rcfile, it still read
> /etc/bash.bashrc.

That's because /etc/profile does it explicitly:

PS1='\u@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
     . /etc/bash.bashrc

Read and understand the OPTIONS and INVOCATION sections of the bash man 

>> add "--noprofile --norc" and set everything in the env command.
> Base on my knowledge, I found the env command can't set like "set +h"
> or "umask 022" those are set in the file .bashrc.

No it doesn't.  env runs a program in a modified environment. bash is a 
program where set and umask are run by bash, not env.

>> There are almost always ways to work around little problems.
> I think, it isn't everyone know how to solve these lttle
> problems(just like me), so the best way is give the right guide in
> the LFS BOOK.

No, we really can't instruct for every possible combination of lack of 
knowledge.  Having enough background in Linux to solve simple usage 
problems like this is really a prerequisite for LFS.

   -- Bruce

More information about the lfs-support mailing list