Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
49
Help us understand the problem. What is going on with this article?
@m_zuma

VSCode の統合ターミナルで Bash on Ubuntu を利用するための設定

More than 3 years have passed since last update.

Windows 上で使用している VSCode の統合ターミナルで Bash on Ubuntu (on Windows) を利用するための設定。

公式ドキュメント: Integrated Terminal in Visual Studio Code

設定

  1. [ファイル]-[基本設定]-[ユーザー設定] を選択
  2. 検索欄に terminal.integrated.shell.windows を入力
  3. 右側の User Settings に以下を入力し、保存
{
    // Bash on Ubuntu (on Windows)
    "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe",
}

Bash on Ubuntu (on Windows) ではなく PowerShell やコマンドプロンプト、Git Bash を利用したい場合は以下の通り設定:

コマンドプロンプト

{
    // 64-bit cmd if available, otherwise 32-bit
    "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe"
}

PowerShell

{
    // 64-bit PowerShell if available, otherwise 32-bit
    "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
}

Git Bash

{
    // Git Bash
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
}

2017/12/29 追記

Microsoft Store から入れた Ubuntu

{
    // Ubuntu (Windows Subsystem for Linux)
    "terminal.integrated.shell.windows": "C:\\Users\\<ユーザ名>\\AppData\\Local\\Microsoft\\WindowsApps\\ubuntu.exe",
}
49
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  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

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
49
Help us understand the problem. What is going on with this article?