Create startup files for lfs

Continuing 4.4

Here I flipped out when the prompt changed. And I had to convince Google AI Mode that this should be done as in the manual while logged in as lfs.

So I logged in with

su - lfs

The previous time, in 4.3, when I logged in/on as lfs, there was a normal prompt. Now the prompt was something like (I didn’t write it down)

-bash-5.2$

which completely freaked me out. Google AI Mode described this as a generic prompt and explained or otherwise got me to see that this was because I had moved /etc/bash.bashrc. I see that the only descriptions of prompts are in /etc/bash.bashrc and in the .bash_profile that I hadn’t created yet.

From within lfs,
created a ~/.bash_profile from the manual
created a ~/.bashrc from the manual
added MAKEFLAGS stuff from the manual to ~./bashrc, using the -j$(nproc) as written

I had a question about whether I was supposed to fill in the number of cores or not. The answer was not. And it said that part of the code was in italics just to point it out and not because I should do something with it. I have to say that I also had thought about whether it should somehow be entered in italics.

Then refresh the user profile

source ~/.profile

OK, so that part was done according to the manual.

I had a lot of confusing ideas about things related to this part. They were related to what the files in $LFS are for and where and what the lfs user is.

Previously I had asked Google AI Mode why I was going to create startup files that Ubuntu doesn’t use, so I seemed to be confused between host and LFS.

Having created the files while logged in as lfs, I later couldn’t figure out where they were (despite having tried to study file structure in the abstract, and I have seen home on both Linux and Mac).

Google AI Mode wanted in the worst way to set these files up before trying to use lfs, but I see doing it the manual’s way at least reliably gets the files into the /home/lfs directory.

So later, hypothetically, asking for a friend, when I had to correct an error, these files are found on the Ubuntu partition:

/home/lfs/.bashrc
/home/lfs/.bash_profile

Somehow the difference between $LFS and user lfs confused me. I mean, lfs’s stuff is not on $LFS. I get it (I think) but it still kind of makes my head spin.