sh[it] and What am I missing here?

Baho Utot baho-utot at
Sun Jun 5 18:01:31 UTC 2016

On 06/05/16 13:52, Brandon J. Wandersee wrote:
> Baho Utot writes:
>> So here is what I tried.
>> Power on console ( boot computer )
>> Login in as root
>> /bin/sh
>> set    #  to show environment etc
>> WTF SHELL says I am in csh????
>> It should say SHELL=/bin/sh
>> Hence my question here as to what is going on.
> It seems the $SHELL variable is derived from the settings for the
> account you log into. That variable persists when you run another shell,
> as (a) the base environment is inherited by child processes; and (b) the
> (interactive) shell is just another running user program at that point,
> not a base working environment itself.
> Log in as root and start a different (interactive) shell, and the
> variable will remain unchanged. Log in as a normal user and start
> another shell, and you'll get the same result. Log in as any user and
> `su` to any other user---simulating a new login---and the value of the
> variable will change to the user shell for the new account.
> As I understand it, you can have a script you've executed change the
> variable having it simulate a login shell and parse a custom
> configuration file. See the "Invocation" section of the sh(8) man page
> for an explanation.

Ok, But I think I will need to talk to Jack Daniels first then I will 
have a look at the man page

More information about the freebsd-questions mailing list