Undocumented /etc/bash.bashrc

In 4.4: rename (move out of the way) /etc/bash.bashrc to prevent it affecting the lfs user environment. (Note: manual says can restore it after the project.)

Ubuntu has an /etc/bash.bashrc, I don’t know which other distros have it or not. The LFS manual just refers to it as “undocumented.” So far I am sensing some hostility to Ubuntu from the manual, in the sense of the distribution that cannot be named.

Many sources say not to use Ubuntu for LFS as just too much weird stuff associated with it. I was like How bad can it be? I didn’t want to spend the time or brain cells to get acquainted with a different distribution, so I guess that’s on me.

In August, Google AI Mode said that the renaming should have been done before logging on as user lfs for the first time. In that case, the important note about /etc/bash.bashrc needed to be in 4.3 instead of 4.4, as we log on as lfs at the end of 4.3. I’m not sure it was important when it was renamed (something else that remains to be seen).

My first attempt at renaming an /etc file led immediately to another Google AI Mode session (this one not while logged in to Google). This session contained some bad advice, one about how to log in as root, and one about changing permissions to the lfs directories.

I tried to move /etc/bash.bashrc to /etc/bash.bashrc.NOUSE with sudo, but permission was denied.

Google AI Mode told me to use sudo -s to be root and then do it. This worked. There was a long explanation why this was different from sudo, which I saved on that machine but didn’t print out.

Of course the next day a different Google AI Mode session said that was wrong too, and that it was really important to use:

sudo su -

as that was subtly different from sudo -s.

I’m going to make a separate post about this whole issue, and go back and put warnings on previous posts.