Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On linux the $SHELL variable is set by login(1) and not the shell itself. I think this is the case for BSD too.

See:

https://man.archlinux.org/man/login.1

> The environment variable values for $HOME, $USER, $SHELL, $PATH, $LOGNAME, and $MAIL are set according to the appropriate fields in the password entry.



True. For instance I have "/bin/bash" in passwd, but I always switch to zsh.

$SHELL remains "/bin/bash".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: