.bashrc at ssh login

后端 未结 4 1541
悲&欢浪女
悲&欢浪女 2020-11-29 15:07

When I ssh into my ubuntu-box running Hardy 8.04, the environment variables in my .bashrc are not set.

If I do a source .bashrc, the variab

4条回答
  •  没有蜡笔的小新
    2020-11-29 15:20

    .bashrc is not sourced when you log in using SSH. You need to source it in your .bash_profile like this:

    if [ -f ~/.bashrc ]; then
      . ~/.bashrc
    fi
    

提交回复
热议问题