14
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Posted at

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

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なのでカンマの付け忘れに注意

参考

14
8
1

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
14
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?