Question about bash_profile script ?
Hi,
I'm new to LFS project and want to learn as much as possible.I'm wondering what is the point of setting bash_profile script Code:
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash |
type exec is a shell built-in for bash. From the bash man page,
Code:
SHELL BUILTIN COMMANDS Code:
NAME The TERM and HOME environment variables are specified because a new empty environment will be created without those variables. Therefore they should be set using the current environment variables. Why is it doing that? Essentially what it is doing is setting the format for how the environment is displayed for the user. For instance when user sam logs in then his environment would look like the following. Code:
sam:~$ Code:
[sam@stealth ~]$ SAM |
Quote:
thank you for trying to explain these thing to me. I perfectly understand what you say, but my real question is this - Yes, I will start with clean environment after log in, HOWEVER, environment will be clean as long as I don't start new non-login shell.In that new shell, environment variables will be set from some other configuration file(not sure where from), so that kind of defeat the purpose of bash_profile script.For example, when I log in, and then start new shell where I will build the system, I get this env vars set(my host system is ubuntu) Code:
XDG_MENU_PREFIX=lxde- |
Quote:
Quote:
Code:
[plains] druuna ~ $ env |
Quote:
|
All times are GMT -5. The time now is 07:31 AM. |