60
47

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 の統合ターミナルで Bash on Ubuntu を利用するための設定

Last updated at Posted at 2017-02-06

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",
}
60
47
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
60
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?