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

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

More than 1 year has 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",
}
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.
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
ユーザーは見つかりませんでした