0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

source .bashrcを自動的に行う.

Posted at
  • SSH接続が切れるたびに,
source ~/.bashrc

が反映されなくなる.

解決法

  • SSHで接続した際に.bashrcではなく.bash_profileまたは.profileが読み込まれます。そのため、.bash_profileに.bashrcを読み込むように指示することが有効です。
echo -e "\nif [ -f ~/.bashrc ]; then\n   source ~/.bashrc\nfi" >> ~/.bash_profile
source ~/.bashrc
source ~/.bash_profile
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?