Ask Your Question

.profile is not sourced automatically on new terminal login, why?

asked 2015-11-04 13:51:17 -0600

HoboPrimate gravatar image

I'm following these instructions at the developer fedora site, and it says to add some environment variables to .profile. Manually sourcing .profile works to add go dir to the path, but it doesn't automatically get sourced when I login at the terminal. I have also tried doing it in .bash_profile but also doesn't work.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-04 16:24:05 -0600

bash reads those files on a login shell, perhaps starting in a xterm doesn't count . try putting things in .bashrc . "A login shell is one whose first character of argument zero is a -, or one started with the --login option." from man page I just did a ps aux |grep [b]ash and most of my shells started in xterms are not login shells. I did a su - and that one was considered a login shell.

edit flag offensive delete link more


Thank you so much, it worked putting them in .bashrc . Also thanks for the explanation!

HoboPrimate gravatar imageHoboPrimate ( 2015-11-04 19:36:33 -0600 )edit

Question Tools

1 follower


Asked: 2015-11-04 13:51:17 -0600

Seen: 739 times

Last updated: Nov 04 '15