I know that environment variables are set through reading or executing several configuration files, such as
But when I was reading this blog post, I tried to start a non-login interactive bash shell without importing environment, using the following command:
osboxes@osboxes:~$ env -i bash
After getting into the new shell, I checked the
PATH variable, and got the following result:
osboxes@osboxes:/home/osboxes$ echo $PATH /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
As far as I know, this non-login interactive shell doesn't read
/etc/environment or source
~/.profile; it only sources
So how is the
PATH variable in this shell set? Is there a specific file to read or source from?