python3(django)の開発環境構築時にubuntuを使用したが、
コーディングする際に使うVScode上でコマンド打てないか調べたところあったの備忘録
事前準備
VScodeがダウンロードされていること
ubuntuがダウンロードされていて、ユーザ名とパスワード設定が終わっていること
VScodeとubuntuの連携
VScodeの左下の設定(歯車)⇒設定
[shell]と検索すると以下の文章が中段辺りにある
Terminal › Integrated › Shell Args: Windows
その下にある以下をクリック
settings.jsonで編集
settings.jsonが開かれるので{}内にbash.exeのパスを追加で完了
settings.json
{
"editor.formatOnPaste": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"emmet.triggerExpansionOnTab": true,
"window.zoomLevel": 0,
"[html]": {
"editor.defaultFormatter": "mohd-akram.vscode-html-format"
},
"files.associations": {
"*.html": "html"
},
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe",
↑これを追加
}
VScode上で[Ctrl + @]でターミナルが開かれる。
ubuntuで開いた時と同じユーザ名になっていれば終了。