[lfs-support] 2.4. Setting The $LFS Variable

Chris Staub chris at beaker67.com
Sat Nov 21 19:06:44 PST 2015

On 11/21/2015 06:15 PM, Felix wrote:
> 2.4. Setting The $LFS Variable
> http://www.linuxfromscratch.org/lfs/view/7.8-systemd/chapter02/aboutlfs
> .html
> Hi,
> after many years of knowing about LFS I finally decided to give it a
> try!.
> As you can see I am only just begun :-)
> My host system is Ubuntu Gnome 15.10.
> I believe that Ubuntu uses dash as default shell, however based upon
> the recommendation in the book I installed bash.
> I then deleted the link /bin/sh to dash and recreated it to /bin/bash.
> Then as section 2.4 I created the files .bash_profile for my user and
> for root with the line:
>> export LFS=/mnt/lfs
> However, testing this with echo $LFS in all sorts of ways, including
> rebooting, sudo su - , sudo echo $LFS , etc. showed that the
> .bash_profile was not being respected.
> I searched the mailing list archives and found the following post:
> http://lists.linuxfromscratch.org/pipermail/blfs-support/2013-February/
> 072064.html
> which gave me the answer to my problem.
> I would like to respectfully suggest that this information could be
> mentioned in Section 2.4 of the book.
> Thank you.
There is no need for that, it won't happen for the lfs user if you're 
following the book. And, if you're referring to that being set for root, 
there's no real need to put that in .bashrc or .bash_profile since 
they're only used a few times. Plus, we don't know what shell you might 
be using for root, so we can't be sure you're even using bash.

More information about the lfs-support mailing list