VSCode远程终端忽略terminal.integrated.profiles.linux配置,无法加载.bashrc
远程VSCode终端无法加载.bashrc的问题
- 远程机器存在
.bashrc文件,通过VSCode远程开发扩展登录后,终端未加载该文件 - 最初误以为是登录shell的加载逻辑问题,修改相关文件后无效果
- 查看终端启动命令为:
/bin/bash '--init-file' '/root/.vscode-server/bin/ddc367ed5c8936efe395cffeec279b04ffd7db78/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh' - 在
>Preferences: Open Remote Settings中禁用Terminal > Integrated > Shell integration: Enabled选项后,终端启动命令变为:/bin/bash - 尝试修改
settings.json配置:
原配置:
修改为添加"terminal.integrated.profiles.linux": { "bash": { "path": "bash", "icon": "terminal-bash", },args参数(期望让bash以登录shell模式运行从而加载.bashrc):"terminal.integrated.profiles.linux": { "bash": { "path": "bash", "icon": "terminal-bash", "args": [ "l" ] }, - 问题仍未解决:远程终端似乎忽略
settings.json中的通用配置,尝试过相关解决方案也无效果
内容的提问来源于stack exchange,提问作者Jacopo
相关产品推荐
相关产品推荐

