Help us understand the problem. What is going on with this article?

VSCodeのRemote-SSHでリモート先のLinuxのbash_profileを読み込む

たいしたことではないけど、ググっても出てこなくて地味に詰まったので備忘録

VSCodeからRemote-SSHでLinuxに接続するとbashrcは読み込まれるがbash_profileは読み込まれないらしく、毎回手動でsource ~/.bash_profileしないといけないようだった。流石に面倒なので何か方法ないか調べたところ、settings.jsonに以下を追記することでターミナル接続時に自動的にbash_profileが読み込まれるようになった。
※settings.jsonは「Ctrl+,」で表示される右画面の右上隅の「{}」マークをクリックすると開ける。

settings.json
{
    ~省略~
    "terminal.integrated.shellArgs.linux": ["-l"]
}

JSONなのでカンマの付け忘れに注意

参考

https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away