LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   lfs bootcd.. (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-bootcd-61386/)

roofy 05-23-2003 12:01 PM

lfs bootcd..
 
well im building and lfs system using the lfs cd (i was usuing knoppix before)....AMAZING...tho i cant do this part

Code:

cat > ~/.bash_profile << "EOF"
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
CC="gcc -s"
export LFS LC_ALL CC
EOF
source ~/.bash_profile

becuase it wont register the tilde key...whats goign on?

trickykid 05-23-2003 12:19 PM

If your in your currently home directory you should be able to leave off the ~/
Or maybe just specify the full path. Not totally sure why you can't register the ~. What keymap are you using for your keyboard?

lfslinux 05-23-2003 01:09 PM

It's most likely a keymap problem yes (i just talked to the lfs bootcd maintainer and he thinks the same thing). The kbd package is installed in a default manner like the LFS book does, so the default keymap is the US-101 one. If you have a different kind of keyboard you need to use loadkeys to load a different map.

Alternatively you do'nt really need to use a tilde if you can't be bothered fixiing the keymap. Use the full path like cat > /home/yourusername/.bash_profile

lfslinux 05-23-2003 01:09 PM

Btw the README file on the CD mentions the loadkeys issue, you may want to read through it (again).

roofy 05-23-2003 02:49 PM

lol thanks what does ~ mean in linux anyway, and ill just use the fullpath :D

lfslinux 05-23-2003 03:01 PM

~ is short for $HOME
$HOME is set by your shell to your home directory as it appears in /etc/passwd.

So, /etc/passwd contains /home/gerard, bash sets $HOME to /home/gerard and since ~ translates into $HOME, ~ == /home/gerard

So ~/.bash_profile is $HOME/.bash_profile or /home/gerard/.bash_profile

You also see those ~ used in URLs ala http://linuxfromscratch.org/~gerard/

If ~ is followed by a username like ~gerard, it'll go lookup the username 'gerard' in /etc/passwd and extracts its home directory. So "ls ~gerard" will make ls look at /etc/passwd, find user 'gerard' find its home directory and lists its contents.

I hope this is clear enough?

roofy 05-23-2003 08:33 PM

what! ok, that is simply amazing, thank you lfslinux for providing the most concise explanation..:D thanks!


All times are GMT -5. The time now is 10:33 AM.