最佳答案
当我ssh进入运行Hardy 8.04的ubuntu盒子时,我的.bashrc中的环境变量没有设置。
如果我做一个源.bashrc,变量被正确设置,一切正常。
为什么登陆时不运行.bashrc ?